Disable h264 for android firefox (#2190)
* Disable H.264 for android firefox * Fix syntax error for rule * lower case * Remove disabled codec from AddTrackRequest * Consistent handling of enabled codecs Mainly cleaning up where we are doing codec filtering. There's also behavior change of how we handle codec compatibility. If a client doesn't support the client's desired codec, we'll pick a backup automatically instead of rejecting the client's request. Requires an update on multi-codec simulcast handling. * fix alternative codec selection --------- Co-authored-by: David Zhao <dz@livekit.io>
This commit is contained in:
co-authored by
David Zhao
parent
1f0ba21854
commit
3633dfe39e
@@ -55,7 +55,7 @@ func TestScriptMatchConfiguration(t *testing.T) {
|
||||
Merge: true,
|
||||
},
|
||||
{
|
||||
Match: &ScriptMatch{Expr: `c.sdk == "ANDROID"`},
|
||||
Match: &ScriptMatch{Expr: `c.sdk == "android"`},
|
||||
Configuration: &livekit.ClientConfiguration{
|
||||
Video: &livekit.VideoConfiguration{
|
||||
HardwareEncoder: livekit.ClientConfigSetting_DISABLED,
|
||||
@@ -98,7 +98,8 @@ func TestScriptMatch(t *testing.T) {
|
||||
{name: "simple match", expr: `c.protocol > 5`, result: true},
|
||||
{name: "invalid expr", expr: `cc.protocol > 5`, err: true},
|
||||
{name: "unexist field", expr: `c.protocols > 5`, err: true},
|
||||
{name: "combined condition", expr: `c.protocol > 5 && (c.sdk=="ANDROID" || c.sdk=="IOS")`, result: true},
|
||||
{name: "combined condition", expr: `c.protocol > 5 && (c.sdk=="android" || c.sdk=="ios")`, result: true},
|
||||
{name: "combined condition2", expr: `(c.device_model == "xiaomi 2201117ti" && c.os == "android) || ((c.browser == "firefox" || c.browser == "firefox mobile") && (c.os == "linux" || c.os == "android"))`, result: false},
|
||||
}
|
||||
|
||||
for _, c := range cases {
|
||||
|
||||
Reference in New Issue
Block a user