clientconfiguration

package
v1.13.7 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StaticConfigurations = []ConfigurationItem{

	{
		Match: must.Get(NewScriptMatch(`c.browser == "safari"`)),
		Configuration: &livekit.ClientConfiguration{
			DisabledCodecs: &livekit.DisabledCodecs{
				Codecs: []*livekit.Codec{
					{Mime: mime.MimeTypeAV1.String()},
				},
			},
		},
		Merge: true,
	},
	{
		Match: must.Get(NewScriptMatch(`c.browser == "safari" && c.browser_version > "18.3"`)),
		Configuration: &livekit.ClientConfiguration{
			DisabledCodecs: &livekit.DisabledCodecs{
				Publish: []*livekit.Codec{
					{Mime: mime.MimeTypeVP9.String()},
				},
			},
		},
		Merge: true,
	},
	{
		Match: must.Get(NewScriptMatch(`(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: mime.MimeTypeH264.String()},
				},
			},
		},
		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 {
	// contains filtered or unexported fields
}

func NewScriptMatch

func NewScriptMatch(expr string) (*ScriptMatch, error)

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