clientconfiguration

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StaticConfigurations = []ConfigurationItem{

	{
		Match: &ScriptMatch{Expr: `(c.device_model == "xiaomi 2201117ti" && c.os == "android") ||
		  ((c.browser == "firefox" || c.browser == "firefox mobile") && (c.os == "linux" || c.os == "android"))`},
		Configuration: &livekit.ClientConfiguration{
			DisabledCodecs: &livekit.DisabledCodecs{
				Publish: []*livekit.Codec{{Mime: "video/h264"}},
			},
		},
		Merge: false,
	},
}

StaticConfigurations list specific device-side limitations that should be disabled at a global level

Functions

This section is empty.

Types

type ClientConfigurationManager

type ClientConfigurationManager interface {
	GetConfiguration(clientInfo *livekit.ClientInfo) *livekit.ClientConfiguration
}

type ConfigurationItem

type ConfigurationItem struct {
	Match
	Configuration *livekit.ClientConfiguration
	Merge         bool
}

type Match

type Match interface {
	Match(clientInfo *livekit.ClientInfo) (bool, error)
}

type ScriptMatch

type ScriptMatch struct {
	Expr string
}

func (*ScriptMatch) Match

func (m *ScriptMatch) Match(clientInfo *livekit.ClientInfo) (bool, error)

use result of eval script expression for match. expression examples: protocol bigger than 5 : c.protocol > 5 browser if firefox: c.browser == "firefox" combined rule : c.protocol > 5 && c.browser == "firefox"

type StaticClientConfigurationManager

type StaticClientConfigurationManager struct {
	// contains filtered or unexported fields
}

func NewStaticClientConfigurationManager

func NewStaticClientConfigurationManager(confs []ConfigurationItem) *StaticClientConfigurationManager

func (*StaticClientConfigurationManager) GetConfiguration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL