Commit a5dfedf7 authored by John Rummell's avatar John Rummell Committed by Commit Bot

Change EncryptionScheme to match latest spec

The current version of the EME spec
(https://w3c.github.io/encrypted-media/) has encryptionScheme as a
DOMString with an additional value allowed ("cbcs-1-9"). Updating
the code to match this.

This also moves the feature to stable now that it has been approved.

With this change the W3C test
(https://wpt.live/encrypted-media/clearkey-check-encryption-scheme.https.html)
passes.

Bug: 1035153
Test: Updated media_blink_unittests, browser_tests, and WPT tests pass
Change-Id: I00cb2ce8a4c4f52f95817471226b5e8129660247
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1972617Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Commit-Queue: John Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#731780}
parent 65afcfa0
......@@ -61,11 +61,9 @@ const char kSuccessResult[] = "success";
const char kUnsupportedResult[] =
"Unsupported keySystem or supportedConfigurations.";
const char kUnexpectedResult[] = "unexpected result";
const char kTypeErrorResult[] = "TypeError";
#define EXPECT_SUCCESS(test) EXPECT_EQ(kSuccessResult, test)
#define EXPECT_UNSUPPORTED(test) EXPECT_EQ(kUnsupportedResult, test)
#define EXPECT_TYPEERROR(test) EXPECT_EQ(kTypeErrorResult, test)
// Any support is acceptable. This can be used around new CDM check-in time
// where test expectations can change based on the new CDM's capability.
......@@ -280,7 +278,6 @@ class EncryptedMediaSupportedTypesTest : public InProcessBrowserTest {
base::ASCIIToUTF16(kSuccessResult));
title_watcher.AlsoWaitForTitle(base::ASCIIToUTF16(kUnsupportedResult));
title_watcher.AlsoWaitForTitle(base::ASCIIToUTF16(kUnexpectedResult));
title_watcher.AlsoWaitForTitle(base::ASCIIToUTF16(kTypeErrorResult));
EXPECT_TRUE(content::ExecuteScript(contents, command));
base::string16 result = title_watcher.WaitAndGetTitle();
return base::UTF16ToASCII(result);
......@@ -722,17 +719,17 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesClearKeyTest,
EXPECT_SUCCESS(IsAudioEncryptionSchemeSupported(kClearKey, nullptr));
EXPECT_SUCCESS(IsAudioEncryptionSchemeSupported(kClearKey, "cenc"));
EXPECT_SUCCESS(IsAudioEncryptionSchemeSupported(kClearKey, "cbcs"));
EXPECT_SUCCESS(IsAudioEncryptionSchemeSupported(kClearKey, "cbcs-1-9"));
EXPECT_SUCCESS(IsVideoEncryptionSchemeSupported(kClearKey, nullptr));
EXPECT_SUCCESS(IsVideoEncryptionSchemeSupported(kClearKey, "cenc"));
EXPECT_SUCCESS(IsVideoEncryptionSchemeSupported(kClearKey, "cbcs"));
EXPECT_SUCCESS(IsVideoEncryptionSchemeSupported(kClearKey, "cbcs-1-9"));
// Invalid encryption schemes will be rejected. However, invalid values
// generate a TypeError (The provided value '...' is not a valid enum value
// of type EncryptionScheme), which is not handled by the test page.
EXPECT_TYPEERROR(IsAudioEncryptionSchemeSupported(kClearKey, "Invalid"));
EXPECT_TYPEERROR(IsVideoEncryptionSchemeSupported(kClearKey, "Invalid"));
EXPECT_TYPEERROR(IsAudioEncryptionSchemeSupported(kClearKey, ""));
EXPECT_TYPEERROR(IsVideoEncryptionSchemeSupported(kClearKey, ""));
// Invalid encryption schemes will be rejected.
EXPECT_UNSUPPORTED(IsAudioEncryptionSchemeSupported(kClearKey, "Invalid"));
EXPECT_UNSUPPORTED(IsVideoEncryptionSchemeSupported(kClearKey, "Invalid"));
EXPECT_UNSUPPORTED(IsAudioEncryptionSchemeSupported(kClearKey, ""));
EXPECT_UNSUPPORTED(IsVideoEncryptionSchemeSupported(kClearKey, ""));
}
//
......@@ -942,19 +939,21 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesExternalClearKeyTest,
EXPECT_SUCCESS(IsAudioEncryptionSchemeSupported(kExternalClearKey, nullptr));
EXPECT_SUCCESS(IsAudioEncryptionSchemeSupported(kExternalClearKey, "cenc"));
EXPECT_SUCCESS(IsAudioEncryptionSchemeSupported(kExternalClearKey, "cbcs"));
EXPECT_SUCCESS(
IsAudioEncryptionSchemeSupported(kExternalClearKey, "cbcs-1-9"));
EXPECT_SUCCESS(IsVideoEncryptionSchemeSupported(kExternalClearKey, nullptr));
EXPECT_SUCCESS(IsVideoEncryptionSchemeSupported(kExternalClearKey, "cenc"));
EXPECT_SUCCESS(IsVideoEncryptionSchemeSupported(kExternalClearKey, "cbcs"));
EXPECT_SUCCESS(
IsVideoEncryptionSchemeSupported(kExternalClearKey, "cbcs-1-9"));
// Invalid encryption schemes will be rejected. However, invalid values
// generate a TypeError (The provided value '...' is not a valid enum value
// of type EncryptionScheme), which is not handled by the test page.
EXPECT_TYPEERROR(
// Invalid encryption schemes will be rejected.
EXPECT_UNSUPPORTED(
IsAudioEncryptionSchemeSupported(kExternalClearKey, "Invalid"));
EXPECT_TYPEERROR(
EXPECT_UNSUPPORTED(
IsVideoEncryptionSchemeSupported(kExternalClearKey, "Invalid"));
EXPECT_TYPEERROR(IsAudioEncryptionSchemeSupported(kExternalClearKey, ""));
EXPECT_TYPEERROR(IsVideoEncryptionSchemeSupported(kExternalClearKey, ""));
EXPECT_UNSUPPORTED(IsAudioEncryptionSchemeSupported(kExternalClearKey, ""));
EXPECT_UNSUPPORTED(IsVideoEncryptionSchemeSupported(kExternalClearKey, ""));
}
// External Clear Key is disabled by default.
......@@ -1199,17 +1198,17 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineTest,
EXPECT_WV_SUCCESS(IsAudioEncryptionSchemeSupported(kWidevine, nullptr));
EXPECT_WV_SUCCESS(IsAudioEncryptionSchemeSupported(kWidevine, "cenc"));
EXPECT_WV_SUCCESS(IsAudioEncryptionSchemeSupported(kWidevine, "cbcs"));
EXPECT_WV_SUCCESS(IsAudioEncryptionSchemeSupported(kWidevine, "cbcs-1-9"));
EXPECT_WV_SUCCESS(IsVideoEncryptionSchemeSupported(kWidevine, nullptr));
EXPECT_WV_SUCCESS(IsVideoEncryptionSchemeSupported(kWidevine, "cenc"));
EXPECT_WV_SUCCESS(IsVideoEncryptionSchemeSupported(kWidevine, "cbcs"));
EXPECT_WV_SUCCESS(IsVideoEncryptionSchemeSupported(kWidevine, "cbcs-1-9"));
// Invalid encryption schemes will be rejected. However, invalid values
// generate a TypeError (The provided value '...' is not a valid enum value
// of type EncryptionScheme), which is not handled by the test page.
EXPECT_TYPEERROR(IsAudioEncryptionSchemeSupported(kWidevine, "Invalid"));
EXPECT_TYPEERROR(IsVideoEncryptionSchemeSupported(kWidevine, "Invalid"));
EXPECT_TYPEERROR(IsAudioEncryptionSchemeSupported(kWidevine, ""));
EXPECT_TYPEERROR(IsVideoEncryptionSchemeSupported(kWidevine, ""));
// Invalid encryption schemes will be rejected.
EXPECT_UNSUPPORTED(IsAudioEncryptionSchemeSupported(kWidevine, "Invalid"));
EXPECT_UNSUPPORTED(IsVideoEncryptionSchemeSupported(kWidevine, "Invalid"));
EXPECT_UNSUPPORTED(IsAudioEncryptionSchemeSupported(kWidevine, ""));
EXPECT_UNSUPPORTED(IsVideoEncryptionSchemeSupported(kWidevine, ""));
}
//
......@@ -1220,8 +1219,8 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineTest,
// - Linux/Mac/Windows: Feature media::kHardwareSecureDecryption is enabled, and
// command line switch kOverrideHardwareSecureCodecsForTesting is used to always
// enable vp8 and vp9, and disable avc1; always enable 'cenc' and disable
// 'cbcs', for HW_SECURE* robustness levels. With the switch, real hardware
// capabilities are not checked for the stability of tests.
// 'cbcs'/'cbcs-1-9', for HW_SECURE* robustness levels. With the switch, real
// hardware capabilities are not checked for the stability of tests.
IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineHwSecureTest,
Robustness) {
......@@ -1297,8 +1296,10 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineHwSecureTest,
// Both encryption schemes are supported when no robustness is specified.
EXPECT_WV_SUCCESS(IsAudioEncryptionSchemeSupported(kWidevine, "cenc"));
EXPECT_WV_SUCCESS(IsAudioEncryptionSchemeSupported(kWidevine, "cbcs"));
EXPECT_WV_SUCCESS(IsAudioEncryptionSchemeSupported(kWidevine, "cbcs-1-9"));
EXPECT_WV_SUCCESS(IsVideoEncryptionSchemeSupported(kWidevine, "cenc"));
EXPECT_WV_SUCCESS(IsVideoEncryptionSchemeSupported(kWidevine, "cbcs"));
EXPECT_WV_SUCCESS(IsVideoEncryptionSchemeSupported(kWidevine, "cbcs-1-9"));
// Both encryption schemes are supported when SW_SECURE* robustness is
// specified.
......@@ -1306,10 +1307,14 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineHwSecureTest,
IsAudioEncryptionSchemeSupported(kWidevine, "cenc", "SW_SECURE_CRYPTO"));
EXPECT_WV_SUCCESS(
IsAudioEncryptionSchemeSupported(kWidevine, "cbcs", "SW_SECURE_CRYPTO"));
EXPECT_WV_SUCCESS(IsAudioEncryptionSchemeSupported(kWidevine, "cbcs-1-9",
"SW_SECURE_CRYPTO"));
EXPECT_WV_SUCCESS(
IsVideoEncryptionSchemeSupported(kWidevine, "cenc", "SW_SECURE_DECODE"));
EXPECT_WV_SUCCESS(
IsVideoEncryptionSchemeSupported(kWidevine, "cbcs", "SW_SECURE_DECODE"));
EXPECT_WV_SUCCESS(IsVideoEncryptionSchemeSupported(kWidevine, "cbcs-1-9",
"SW_SECURE_DECODE"));
// For HW_SECURE* robustness levels. 'cenc' is always supported. 'cbcs' is
// supported on ChromeOS, but not on other platforms.
......@@ -1320,13 +1325,21 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineHwSecureTest,
#if defined(OS_CHROMEOS)
EXPECT_WV_SUCCESS(
IsAudioEncryptionSchemeSupported(kWidevine, "cbcs", "HW_SECURE_CRYPTO"));
EXPECT_WV_SUCCESS(IsAudioEncryptionSchemeSupported(kWidevine, "cbcs-1-9",
"HW_SECURE_CRYPTO"));
EXPECT_WV_SUCCESS(
IsVideoEncryptionSchemeSupported(kWidevine, "cbcs", "HW_SECURE_ALL"));
EXPECT_WV_SUCCESS(
IsVideoEncryptionSchemeSupported(kWidevine, "cbcs-1-9", "HW_SECURE_ALL"));
#else
EXPECT_UNSUPPORTED(
IsAudioEncryptionSchemeSupported(kWidevine, "cbcs", "HW_SECURE_CRYPTO"));
EXPECT_UNSUPPORTED(IsAudioEncryptionSchemeSupported(kWidevine, "cbcs-1-9",
"HW_SECURE_CRYPTO"));
EXPECT_UNSUPPORTED(
IsVideoEncryptionSchemeSupported(kWidevine, "cbcs", "HW_SECURE_ALL"));
EXPECT_UNSUPPORTED(
IsVideoEncryptionSchemeSupported(kWidevine, "cbcs-1-9", "HW_SECURE_ALL"));
#endif
}
......
......@@ -368,9 +368,10 @@ EmeConfigRule KeySystemConfigSelector::GetEncryptionSchemeConfigRule(
const std::string& key_system,
const EmeEncryptionScheme encryption_scheme) {
switch (encryption_scheme) {
// https://github.com/WICG/encrypted-media-encryption-scheme/blob/master/explainer.md
// "A missing or null value indicates that any encryption scheme is
// acceptable."
// https://w3c.github.io/encrypted-media/#dom-mediakeysystemmediacapability-encryptionscheme
// "A value which is null or not present indicates to the user agent that
// no specific encryption scheme is required by the application, and
// therefore any encryption scheme is acceptable."
// To fully implement this, we need to get the config rules for both kCenc
// and kCbcs, which could be conflicting, and choose a final config rule
// somehow. If we end up choosing the rule for kCbcs, we could actually
......@@ -381,8 +382,16 @@ EmeConfigRule KeySystemConfigSelector::GetEncryptionSchemeConfigRule(
return key_systems_->GetEncryptionSchemeConfigRule(
key_system, EncryptionScheme::kCenc);
case EmeEncryptionScheme::kCbcs:
case EmeEncryptionScheme::kCbcs_1_9:
return key_systems_->GetEncryptionSchemeConfigRule(
key_system, EncryptionScheme::kCbcs);
case EmeEncryptionScheme::kUnrecognized:
// https://w3c.github.io/encrypted-media/#get-supported-capabilities-for-audio-video-type
// "If encryption scheme is non-null and is not recognized or not
// supported by implementation, continue to the next iteration."
// The value provided was an empty string or some other value that is
// not recognized, so treat it as a scheme that is not supported.
return EmeConfigRule::NOT_SUPPORTED;
}
NOTREACHED();
......
......@@ -84,7 +84,11 @@ media::EncryptionScheme ConvertEncryptionScheme(
case EncryptionScheme::kCenc:
return media::EncryptionScheme::kCenc;
case EncryptionScheme::kCbcs:
case EncryptionScheme::kCbcs_1_9:
return media::EncryptionScheme::kCbcs;
case EncryptionScheme::kUnrecognized:
// Not used in these tests.
break;
}
NOTREACHED();
......
......@@ -14,6 +14,8 @@ struct WebMediaKeySystemMediaCapability {
kNotSpecified,
kCenc,
kCbcs,
kCbcs_1_9, // CBCS with a specific encrypt:skip pattern of 1:9.
kUnrecognized
};
WebMediaKeySystemMediaCapability() = default;
......
......@@ -93,6 +93,11 @@ static HeapVector<Member<MediaKeySystemMediaCapability>> ConvertCapabilities(
switch (capabilities[i].encryption_scheme) {
case WebMediaKeySystemMediaCapability::EncryptionScheme::kNotSpecified:
// https://w3c.github.io/encrypted-media/#dom-mediakeysystemaccess-getconfiguration
// "If encryptionScheme was not given by the application, the
// accumulated configuration MUST still contain a encryptionScheme
// field with a value of null, so that polyfills can detect the user
// agent's support for the field without specifying specific values."
capability->setEncryptionSchemeToNull();
break;
case WebMediaKeySystemMediaCapability::EncryptionScheme::kCenc:
......@@ -101,6 +106,13 @@ static HeapVector<Member<MediaKeySystemMediaCapability>> ConvertCapabilities(
case WebMediaKeySystemMediaCapability::EncryptionScheme::kCbcs:
capability->setEncryptionScheme("cbcs");
break;
case WebMediaKeySystemMediaCapability::EncryptionScheme::kCbcs_1_9:
capability->setEncryptionScheme("cbcs-1-9");
break;
case WebMediaKeySystemMediaCapability::EncryptionScheme::kUnrecognized:
NOTREACHED()
<< "Unrecognized encryption scheme should never be returned.";
break;
}
result[i] = capability;
......
......@@ -33,9 +33,11 @@ ConvertEncryptionScheme(const String& encryption_scheme) {
return WebMediaKeySystemMediaCapability::EncryptionScheme::kCenc;
if (encryption_scheme == "cbcs")
return WebMediaKeySystemMediaCapability::EncryptionScheme::kCbcs;
if (encryption_scheme == "cbcs-1-9")
return WebMediaKeySystemMediaCapability::EncryptionScheme::kCbcs_1_9;
NOTREACHED();
return WebMediaKeySystemMediaCapability::EncryptionScheme::kNotSpecified;
// Any other strings are not recognized (and therefore not supported).
return WebMediaKeySystemMediaCapability::EncryptionScheme::kUnrecognized;
}
static WebVector<WebMediaKeySystemMediaCapability> ConvertCapabilities(
......@@ -57,14 +59,8 @@ static WebVector<WebMediaKeySystemMediaCapability> ConvertCapabilities(
if (type.GetParameters().ParameterCount() == 1u)
result[i].codecs = type.ParameterValueForName("codecs");
}
result[i].robustness = capabilities[i]->robustness();
// From
// https://github.com/WICG/encrypted-media-encryption-scheme/blob/master/explainer.md
// "Asking for "any" encryption scheme is unrealistic. Defining null as
// "any scheme" is convenient for backward compatibility, though.
// Applications which ignore this feature by leaving encryptionScheme null
// get the same user agent behavior they did before this feature existed."
result[i].robustness = capabilities[i]->robustness();
result[i].encryption_scheme =
capabilities[i]->hasEncryptionScheme()
? ConvertEncryptionScheme(capabilities[i]->encryptionScheme())
......
......@@ -2,12 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://w3c.github.io/encrypted-media/#idl-def-MediaKeySystemMediaCapability
enum EncryptionScheme { "cenc", "cbcs" };
// https://w3c.github.io/encrypted-media/#mediakeysystemmediacapability-dictionary
dictionary MediaKeySystemMediaCapability {
DOMString contentType = "";
DOMString robustness = "";
[RuntimeEnabled=EncryptedMediaEncryptionSchemeQuery] EncryptionScheme? encryptionScheme = null;
[RuntimeEnabled=EncryptedMediaEncryptionSchemeQuery] DOMString? encryptionScheme = null;
};
......@@ -623,7 +623,7 @@
},
{
name: "EncryptedMediaEncryptionSchemeQuery",
status: "test",
status: "stable",
},
{
name: "EncryptedMediaHdcpPolicyCheck",
......
......@@ -38,4 +38,9 @@ function runTest(config, qualifier)
promise_test(
() => checkEncryptionScheme('cbcs'),
testnamePrefix(qualifier, config.keysystem) + ' support for "cbcs" encryption scheme.');
promise_test(
() => checkEncryptionScheme('cbcs-1-9'),
testnamePrefix(qualifier, config.keysystem) +
' support for "cbcs-1-9" encryption scheme.');
}
......@@ -33,15 +33,15 @@
}
// Verifies that calling navigator.requestMediaKeySystemAccess()
// with |configuration| throws a TypeError.
function expectTypeError(configuration, testName) {
// with |configuration| fails (due to no encryptionScheme being
// supported).
function expectFailure(configuration, testName) {
promise_test(async test => {
try {
await navigator.requestMediaKeySystemAccess('org.w3.clearkey', configuration);
assert_unreached('Unexpected requestMediaKeySystemAccess() success.');
} catch(error) {
// Error must be a TypeError.
assert_equals(error.name, 'TypeError', 'unexpected error');
// Error is what we want to happen.
}
}, testName);
}
......@@ -102,17 +102,27 @@
expectSupport([buildConfiguration({audio: 'cbcs'}, {video: 'cbcs'})],
'cbcs', 'cbcs', 'Audio and Video supports cbcs');
// Test "cbcs-1-9".
expectSupport([buildConfiguration({audio: 'cbcs-1-9'})],
'cbcs-1-9', undefined, 'Audio supports cbcs-1-9');
expectSupport([buildConfiguration({video: 'cbcs-1-9'})],
undefined, 'cbcs-1-9', 'Video supports cbcs-1-9');
expectSupport([buildConfiguration({audio: 'cbcs-1-9'}, {video: 'cbcs-1-9'})],
'cbcs-1-9', 'cbcs-1-9', 'Audio and Video supports cbcs-1-9');
// Test "invalid", which should fail.
expectTypeError([buildConfiguration({audio: 'invalid'})],
expectFailure([buildConfiguration({audio: 'invalid'})],
'Audio fails with invalid scheme');
expectTypeError([buildConfiguration({video: 'invalid'})],
expectFailure([buildConfiguration({video: 'invalid'})],
'Video fails with invalid scheme');
expectTypeError([buildConfiguration({audio: 'invalid'}, {video: 'invalid'})],
expectFailure([buildConfiguration({audio: 'invalid'}, {video: 'invalid'})],
'Audio and Video fails with invalid scheme');
expectTypeError([buildConfiguration({audio: 'cenc'}, {video: 'invalid'})],
expectFailure([buildConfiguration({audio: 'cenc'}, {video: 'invalid'})],
'Audio valid, Video invalid scheme');
expectTypeError([buildConfiguration({audio: 'invalid'}, {video: 'cbcs'})],
'Audio invalid scheme, Video valid');
expectFailure([buildConfiguration({audio: 'invalid'}, {video: 'cbcs'})],
'Audio invalid scheme, Video valid with cbcs');
expectFailure([buildConfiguration({audio: 'invalid'}, {video: 'cbcs-1-9'})],
'Audio invalid scheme, Video valid with cbcs-1-9');
// Test without encryptionScheme.
expectSupport([buildConfiguration({audio: null})],
......@@ -127,22 +137,30 @@
null, 'cbcs', 'Audio missing and Video valid');
// Test with "", which is invalid.
expectTypeError([buildConfiguration({audio: ''})],
expectFailure([buildConfiguration({audio: ''})],
'Audio handles empty encryptionScheme');
expectTypeError([buildConfiguration({video: ''})],
expectFailure([buildConfiguration({video: ''})],
'Video handles empty encryptionScheme');
expectTypeError([buildConfiguration({audio: ''}, {video: ''})],
expectFailure([buildConfiguration({audio: ''}, {video: ''})],
'Audio and Video handles empty encryptionScheme');
expectTypeError([buildConfiguration({audio: 'cbcs'}, {video: ''})],
expectFailure([buildConfiguration({audio: 'cbcs'}, {video: ''})],
'Audio valid and Video empty');
expectTypeError([buildConfiguration({audio: ''}, {video: 'cbcs'})],
expectFailure([buildConfiguration({audio: ''}, {video: 'cbcs'})],
'Audio empty and Video valid');
// Test mixed combinations.
expectSupport([buildConfiguration({audio: 'cbcs'}, {video: 'cenc'})],
'cbcs', 'cenc', 'Audio supports cbcs and Video supports cenc');
expectSupport([buildConfiguration({audio: 'cenc'}, {video: 'cbcs'})],
'cenc', 'cbcs', 'Audio supports cenc and Video supports cbcs');
expectSupport([buildConfiguration({audio: 'cenc'}, {video: 'cbcs-1-9'})],
'cenc', 'cbcs-1-9', 'Audio supports cenc and Video supports cbcs-1-9');
expectSupport([buildConfiguration({audio: 'cbcs'}, {video: 'cenc'})],
'cbcs', 'cenc', 'Audio supports cbcs and Video supports cenc');
expectSupport([buildConfiguration({audio: 'cbcs'}, {video: 'cbcs-1-9'})],
'cbcs', 'cbcs-1-9', 'Audio supports cbcs and Video supports cbcs-1-9');
expectSupport([buildConfiguration({audio: 'cbcs-1-9'}, {video: 'cenc'})],
'cbcs-1-9', 'cenc', 'Audio supports cbcs-1-9 and Video supports cenc');
expectSupport([buildConfiguration({audio: 'cbcs-1-9'}, {video: 'cbcs'})],
'cbcs-1-9', 'cbcs', 'Audio supports cbcs-1-9 and Video supports cbcs');
// Test multiple configurations.
expectSupport([buildConfiguration({audio: 'cenc'}),
......@@ -167,11 +185,11 @@
undefined, 'cbcs', 'Mixed entries supports cbcs');
// Test invalid values.
expectTypeError([buildConfiguration({audio: 3})],
expectFailure([buildConfiguration({audio: 3})],
'Audio fails with numeric scheme');
expectTypeError([buildConfiguration({audio: [1, 2, 3]})],
expectFailure([buildConfiguration({audio: [1, 2, 3]})],
'Audio fails with array scheme');
expectTypeError([buildConfiguration({audio: {test: 'test'}})],
expectFailure([buildConfiguration({audio: {test: 'test'}})],
'Audio fails with object scheme');
</script>
</body>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment