From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- ...-temporary-encrypted-clear-segmented-sources.js | 109 +++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 testing/web-platform/tests/encrypted-media/scripts/playback-temporary-encrypted-clear-segmented-sources.js (limited to 'testing/web-platform/tests/encrypted-media/scripts/playback-temporary-encrypted-clear-segmented-sources.js') diff --git a/testing/web-platform/tests/encrypted-media/scripts/playback-temporary-encrypted-clear-segmented-sources.js b/testing/web-platform/tests/encrypted-media/scripts/playback-temporary-encrypted-clear-segmented-sources.js new file mode 100644 index 0000000000..8f5af2cd6b --- /dev/null +++ b/testing/web-platform/tests/encrypted-media/scripts/playback-temporary-encrypted-clear-segmented-sources.js @@ -0,0 +1,109 @@ +function runTest(configEncrypted,configClear,qualifier) { + + var testname = testnamePrefix(qualifier, configEncrypted.keysystem) + + ', temporary, ' + + /video\/([^;]*)/.exec(configEncrypted.videoType)[1] + + ', playback, encrypted and clear sources in separate segments'; + + var configuration = { initDataTypes: [ configEncrypted.initDataType ], + audioCapabilities: [ { contentType: configEncrypted.audioType } ], + videoCapabilities: [ { contentType: configEncrypted.videoType } ], + sessionTypes: [ 'temporary' ] }; + + async_test(function(test) { + var didAppendEncrypted = false, + _video = configEncrypted.video, + _mediaKeys, + _mediaKeySession, + _mediaSource, + _sourceBuffer; + + function onFailure(error) { + forceTestFailureFromPromise(test, error); + } + + function onVideoError(event) { + var message = (_video.error || {}).message || 'Got unknown error from