diff --git a/README.md b/README.md index 2328047..a6fb088 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,7 @@ A list of of all external media assets used by a deployed instance of MVT: | HLS-CMAF-AVC1-AAC | [DASH IF](https://testassets.dashif.org/) | https://media.axprod.net/TestVectors/v9-MultiFormat/Clear/Manifest_1080p.m3u8 | Not distributed by MVT, used for playback during test execution | | HLS-CMAF-HEVC-AAC | [DASH IF](https://testassets.dashif.org/) | https://dash.akamaized.net/dash264/TestCasesIOP41/CMAF/UnifiedStreaming/ToS_HEVC_MultiRate_MultiRes_IFrame_AAC_WebVTT.m3u8 | Not distributed by MVT, used for playback during test execution | | DASH-PLAYREADY-2.0 | [Microsoft PlayReady](https://testweb.playready.microsoft.com/Content/Content2X) | http://profficialsite.origin.mediaservices.windows.net/c51358ea-9a5e-4322-8951-897d640fdfd7/tearsofsteel_4k.ism/manifest(format=mpd-time-csf) | Not distributed by MVT, used for playback during test execution | +| DASH-PLAYREADY-4.0 | [DASH IF](https://testassets.dashif.org/) | https://media.axprod.net/TestVectors/Cmaf/protected_1080p_h264_cbcs/manifest.mpd | Not distributed by MVT, used for playback during test execution | | HSS-AVC1-AAC | [Microsoft PlayReady](https://testweb.playready.microsoft.com/Content/Content2X) | http://amssamples.streaming.mediaservices.windows.net/683f7e47-bd83-4427-b0a3-26a6c4547782/BigBuckBunny.ism/manifest(format=mpd-time-csf) | Not distributed by MVT, used for playback during test execution | | HSS-AVC1-AAC | [Microsoft PlayReady](https://testweb.playready.microsoft.com/Content/Content2X) | http://profficialsite.origin.mediaservices.windows.net/c51358ea-9a5e-4322-8951-897d640fdfd7/tearsofsteel_4k.ism/manifest | Not distributed by MVT, used for playback during test execution | @@ -152,9 +153,11 @@ Most of the URL parameters can be combined. Here's a full list of supported quer - `loop=false|true` - enable testing selected tests continuosly in a loop. - `stoponfailure=false|true` - tests execution will stop on the first failed test. - `disable_log=false|true` - enable/disable logging. -- `engine_shaka=2.5.20|3.0.1|3.2.1` - select Shaka Player version. Please note it will only affect Shaka test suites. -- `engine_dashjs=2.9.3|3.1.1|4.4.0|latest` - select dash.js version. Please note it will only affect dash.js test suites. -- `engine_hlsjs=1.0.0|1.1.5|1.2.1|1.2.9|1.3.0` - select hls.js version. Please note it will only affect hls.js test suites. +- `engine_shaka=3.0.1|3.2.1|4.3.6` - select Shaka Player version. Please note it will only affect Shaka test suites. +- `engine_dashjs=3.1.1|4.4.0|4.7.0|latest` - select dash.js version. Please note it will only affect dash.js test suites. +- `engine_hlsjs=1.0.0|1.2.1|1.3.0|1.4.5` - select hls.js version. Please note it will only affect hls.js test suites. +- `profile=all|default|desktop|VIP7002W` - depends of tested unit. +- `debug=true|false` - adding additional timestamps to the output log. ### JavaScript API diff --git a/index.html b/index.html index cde73a0..af26989 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, @@ -20,67 +20,38 @@ Media Validation Tool + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/mediaStreams.js b/mediaStreams.js index eb5e2c0..5c51ec3 100644 --- a/mediaStreams.js +++ b/mediaStreams.js @@ -186,6 +186,29 @@ var MS = { }, }, }, + PLAYREADY_4_0_CBCS: { + variant: "dash", + container: "fmp4", + note: "PLayReady 4.0 with CBCS encryption", + video: { + codec: "avc", + }, + audio: { + codec: "aac", + }, + src: "https://media.axprod.net/TestVectors/Cmaf/protected_1080p_h264_cbcs/manifest.mpd", + drm: { + servers: { + "com.microsoft.playready": { + "serverURL": "https://drm-playready-licensing.axprod.net/AcquireLicense", + "httpRequestHeaders": { + "X-AxDRM-Message": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ewogICJ2ZXJzaW9uIjogMSwKICAiY29tX2tleV9pZCI6ICI2OWU1NDA4OC1lOWUwLTQ1MzAtOGMxYS0xZWI2ZGNkMGQxNGUiLAogICJtZXNzYWdlIjogewogICAgInR5cGUiOiAiZW50aXRsZW1lbnRfbWVzc2FnZSIsCiAgICAidmVyc2lvbiI6IDIsCiAgICAibGljZW5zZSI6IHsKICAgICAgImFsbG93X3BlcnNpc3RlbmNlIjogdHJ1ZQogICAgfSwKICAgICJjb250ZW50X2tleXNfc291cmNlIjogewogICAgICAiaW5saW5lIjogWwogICAgICAgIHsKICAgICAgICAgICJpZCI6ICIzMDJmODBkZC00MTFlLTQ4ODYtYmNhNS1iYjFmODAxOGEwMjQiLAogICAgICAgICAgImVuY3J5cHRlZF9rZXkiOiAicm9LQWcwdDdKaTFpNDNmd3YremZ0UT09IiwKICAgICAgICAgICJ1c2FnZV9wb2xpY3kiOiAiUG9saWN5IEEiCiAgICAgICAgfQogICAgICBdCiAgICB9LAogICAgImNvbnRlbnRfa2V5X3VzYWdlX3BvbGljaWVzIjogWwogICAgICB7CiAgICAgICAgIm5hbWUiOiAiUG9saWN5IEEiLAogICAgICAgICJwbGF5cmVhZHkiOiB7CiAgICAgICAgICAibWluX2RldmljZV9zZWN1cml0eV9sZXZlbCI6IDE1MCwKICAgICAgICAgICJwbGF5X2VuYWJsZXJzIjogWwogICAgICAgICAgICAiNzg2NjI3RDgtQzJBNi00NEJFLThGODgtMDhBRTI1NUIwMUE3IgogICAgICAgICAgXQogICAgICAgIH0KICAgICAgfQogICAgXQogIH0KfQ._NfhLVY7S6k8TJDWPeMPhUawhympnrk6WAZHOVjER6M" + } + } + } + }, + cbcs: true, + }, DYNAMIC: { variant: "dash", container: "fmp4", @@ -703,6 +726,7 @@ const StreamSets = { MS.DASH.CMAF_AVC_MP3, ], DRM: [MS.DASH.PLAYREADY_2_0], + DRM_CBCS: [MS.DASH.PLAYREADY_4_0_CBCS], Subtitles: [MS.DASH.FMP4_AVC_AAC_TTML, MS.DASH.WEBM_VP9_OPUS_VTT, MS.DASH.CMAF_AVC_MP3_VTT], }, HLS: { @@ -747,6 +771,7 @@ const StreamSets = { (function () { StreamSets.DASH.Video = StreamSets.DASH.Common.filter((stream) => stream.video); StreamSets.DASH.CommonAndDRM = StreamSets.DASH.Common.concat(StreamSets.DASH.DRM); + StreamSets.DASH.CommonAndDRMCBCS = StreamSets.DASH.Common.concat(StreamSets.DASH.DRM).concat(StreamSets.DASH.DRM_CBCS); StreamSets.HLS.Video = StreamSets.HLS.Common.filter((stream) => stream.video); StreamSets.Progressive.Video = StreamSets.Progressive.Common.filter((stream) => stream.video); })(); diff --git a/patches/0001_js_mse_eme_mvt.patch b/patches/0001_js_mse_eme_mvt.patch index fb3ad91..52518fc 100644 --- a/patches/0001_js_mse_eme_mvt.patch +++ b/patches/0001_js_mse_eme_mvt.patch @@ -126,11 +126,12 @@ index c722460..af1fec6 100644 testName = util.MakeCapitalName(testName) + 'Test'; return window[testName](); } -@@ -51,6 +56,7 @@ var parseParams = function(testSuiteConfig) { +@@ -51,6 +56,8 @@ var parseParams = function(testSuiteConfig) { parseParam('stoponfailure', false)); config.enablewebm = util.stringToBoolean( parseParam('enablewebm', testSuiteConfig.enablewebm)); + config.checkframes = util.stringToBoolean(parseParam('checkframes', false)); ++ config.debug = util.stringToBoolean(parseParam('debug', false)); config.muted = util.stringToBoolean(parseParam('muted', false)); config.novp9 = util.stringToBoolean(parseParam('novp9', false)); config.tests = parseParam('tests'); @@ -176,7 +177,7 @@ index c722460..af1fec6 100644 runner.startTest(0, runner.testList.length); + } + if (harnessConfig.command === 'run') { -+ waitForScriptLoad(2).then(runTest) ++ waitForScriptLoad(3).then(runTest) + } }; diff --git a/src/engineChange.js b/src/engineChange.js index f43af53..7a5ba05 100644 --- a/src/engineChange.js +++ b/src/engineChange.js @@ -22,33 +22,32 @@ var EngineVersions = { shaka: { versions: { - "2.5.20": ["https://ajax.googleapis.com/ajax/libs/shaka-player/2.5.20/shaka-player.compiled.js"], "3.0.1": ["https://ajax.googleapis.com/ajax/libs/shaka-player/3.0.1/shaka-player.compiled.js"], "3.2.1": ["https://ajax.googleapis.com/ajax/libs/shaka-player/3.2.1/shaka-player.compiled.js"], + "4.3.6": ["https://ajax.googleapis.com/ajax/libs/shaka-player/4.3.6/shaka-player.compiled.js"], }, name: "Shaka Player", defaultVersion: "3.2.1", }, dashjs: { versions: { - "2.9.3": ["https://cdn.dashjs.org/v2.9.3/dash.all.min.js", "https://cdn.dashjs.org/v2.9.3/dash.mss.min.js"], "3.1.1": ["https://cdn.dashjs.org/v3.1.1/dash.all.min.js", "https://cdn.dashjs.org/v3.1.1/dash.mss.min.js"], "4.4.0": ["https://cdn.dashjs.org/v4.4.0/dash.all.min.js", "https://cdn.dashjs.org/v4.4.0/dash.mss.min.js"], + "4.7.0": ["https://cdn.dashjs.org/v4.7.0/dash.all.min.js", "https://cdn.dashjs.org/v4.7.0/dash.mss.min.js"], latest: ["https://cdn.dashjs.org/latest/dash.all.min.js", "https://cdn.dashjs.org/latest/dash.mss.min.js"], }, name: "Dash.JS", - defaultVersion: "4.4.0", + defaultVersion: "4.7.0", }, hlsjs: { versions: { "1.0.0": ["https://cdn.jsdelivr.net/npm/hls.js@1.0.0"], - "1.1.5": ["https://cdn.jsdelivr.net/npm/hls.js@1.1.5"], "1.2.1": ["https://cdn.jsdelivr.net/npm/hls.js@1.2.1"], - "1.2.9": ["https://cdn.jsdelivr.net/npm/hls.js@1.2.9"], "1.3.0": ["https://cdn.jsdelivr.net/npm/hls.js@1.3.0"], + "1.4.5": ["https://cdn.jsdelivr.net/npm/hls.js@1.4.5"], }, name: "HLS.js", - defaultVersion: "1.3.0", + defaultVersion: "1.4.5", }, }; @@ -91,7 +90,7 @@ function loadStoredEngine() { if (scriptSources.length) { var script = document.createElement("script"); script.src = scriptSources[0]; - script.async = script.defer = true; + script.defer = true; script.onload = function () { scriptSources.shift(); loadNextScript(); diff --git a/src/engines.js b/src/engines.js index d581e9d..9a7c92b 100644 --- a/src/engines.js +++ b/src/engines.js @@ -198,14 +198,11 @@ class DashjsEngine extends Engine { that.onload(runner, video); }); + this.dashjsPlayer.initialize(video, media.src, false); + if (media.drm) { - var protection = {}; - for (var key in media.drm) { - protection[key] = { serverURL: media.drm[key] }; - } - this.dashjsPlayer.setProtectionData(protection); + this.dashjsPlayer.setProtectionData(media.drm.servers); } - this.dashjsPlayer.initialize(video, media.src, false); // Add subtitles div var subtitleDiv = document.createElement("div"); diff --git a/src/mediaTests.js b/src/mediaTests.js index 03fab74..8e392c9 100644 --- a/src/mediaTests.js +++ b/src/mediaTests.js @@ -37,6 +37,9 @@ function waitForEvent(video, runner, event, predicate = null, maxWaitTimeMs = 10 }, maxWaitTimeMs); function eventHandler() { + if (harnessConfig.debug) { + runner.log("current time: " + video.currentTime) + } if (!predicate || predicate(video)) { receivedEvents += 1; if (receivedEvents >= times) { diff --git a/src/profiles.js b/src/profiles.js index 27d65ba..3a54a4e 100644 --- a/src/profiles.js +++ b/src/profiles.js @@ -34,13 +34,14 @@ function filterUnsupportedOnProfile(profile, tests) { let videoSupported = !stream.video || profile.codecs.includes(stream.video.codec); let audioSupported = !stream.audio || profile.codecs.includes(stream.audio.codec); let drmSupported = !stream.drm || Object.keys(stream.drm.servers).some((drm) => profile.drm.includes(drm)); - return variantSupported && videoSupported && audioSupported && drmSupported; + let cbcsSupported = stream.cbcs ? profile.note.includes("CBCS") : true; + return variantSupported && videoSupported && audioSupported && drmSupported && cbcsSupported; }); } const Profiles = { all: { - note: "Everything enabled", + note: "Everything enabled, CBCS included", drm: ["com.microsoft.playready"], codecs: ["avc", "hevc", "mpeg2", "mpeg4part2", "vp9", "aac", "ac3", "eac3", "mp3", "opus"], native_support: ["dash", "hls", "hss", "progressive"], @@ -57,15 +58,31 @@ const Profiles = { codecs: ["avc", "mpeg4part2", "vp9", "aac", "mp3", "opus"], native_support: ["progressive"], }, + extended_drm: { + note: "Default with CBCS support", + drm: ["com.microsoft.playready"], + codecs: ["avc", "hevc", "mpeg2", "vp9", "aac", "ac3", "eac3", "mp3", "opus"], + native_support: ["dash", "hss", "progressive"], + }, }; -window.ConfigString = parseParam("profile", null) || window.localStorage["profile"] || "default"; -const SelectedProfile = Profiles[window.ConfigString] == undefined ? Profiles["default"] : Profiles[window.ConfigString]; +let getProfile = parseParam("profile", null) || window.localStorage["profile"] || "default"; +const SelectedProfile = Profiles[getProfile] == undefined ? Profiles["default"] : Profiles[getProfile]; +window.ConfigString = Profiles[getProfile] == undefined ? "default" : getProfile; const EngineProperties = { - shaka: { variants: ["dash", "hls"], subtitles: ["ttml", "vtt"] }, - dashjs: { variants: ["dash", "hss"], subtitles: ["ttml", "vtt"] }, - hlsjs: { variants: ["hls"], subtitles: ["vtt"] }, + shaka: { + variants: ["dash", "hls"], + subtitles: ["ttml", "vtt"], + }, + dashjs: { + variants: ["dash", "hss"], + subtitles: ["ttml", "vtt"], + }, + hlsjs: { + variants: ["hls"], + subtitles: ["vtt"], + }, html5: { variants: SelectedProfile.native_support, subtitles: ["ttml", "vtt"], diff --git a/src/suites.js b/src/suites.js index 9c877a1..eed0c68 100644 --- a/src/suites.js +++ b/src/suites.js @@ -102,9 +102,9 @@ window.testSuiteVersions[testVersion]["config"]["defaultTestSuite"] = "codec-sup // in 'skipTests' specify test name as key and reason as value, e.g.: "DASH_FMP4_MP3 Seek": "ONEM-12345" let skipTests = {}; - let tests = makeMvtMediaTests(testPlayback, engine, StreamSets.DASH.CommonAndDRM); - tests = tests.concat(makeMvtMediaTests(testPause, engine, StreamSets.DASH.CommonAndDRM)); - tests = tests.concat(makeMvtMediaTests(testSetPosition, engine, StreamSets.DASH.CommonAndDRM)); + let tests = makeMvtMediaTests(testPlayback, engine, StreamSets.DASH.CommonAndDRMCBCS); + tests = tests.concat(makeMvtMediaTests(testPause, engine, StreamSets.DASH.CommonAndDRMCBCS)); + tests = tests.concat(makeMvtMediaTests(testSetPosition, engine, StreamSets.DASH.CommonAndDRMCBCS)); // tests = tests.concat(makeMvtMediaTests(testPlayRate, engine, StreamSets.DASH.Video, new Unstable("ONEM-26268"))); tests.push(new MvtMediaTest(testChangeAudioTracks, MS.DASH.MULTIAUDIO, engine)); tests = tests.concat(makeMvtMediaTests(testSubtitles, engine, StreamSets.DASH.Subtitles)); @@ -182,16 +182,10 @@ window.testSuiteVersions[testVersion]["config"]["defaultTestSuite"] = "codec-sup let engine = new HlsjsEngine(); // in 'skipTests' specify test name as key and reason as value, e.g.: "DASH_FMP4_MP3 Seek": "ONEM-12345" let skipTests = {}; - StreamSets.HLS.hlsjs = StreamSets.HLS.Common.filter((stream) => { - return stream != MS.HLS.MP2TS_AVC_AAC; // ONEM-28049 - }); - let tests = makeMvtMediaTests(testPlayback, engine, StreamSets.HLS.hlsjs); - tests.push(new MvtMediaTest(testPlayback, MS.HLS.MP2TS_AVC_AAC, engine, new Unstable("ONEM-28049"))); - tests = tests.concat(makeMvtMediaTests(testPause, engine, StreamSets.HLS.hlsjs)); - tests.push(new MvtMediaTest(testPause, MS.HLS.MP2TS_AVC_AAC, engine, new Unstable("ONEM-28049"))); - tests = tests.concat(makeMvtMediaTests(testSetPosition, engine, StreamSets.HLS.hlsjs)); - tests.push(new MvtMediaTest(testSetPosition, MS.HLS.MP2TS_AVC_AAC, engine, new Unstable("ONEM-28049"))); + let tests = makeMvtMediaTests(testPlayback, engine, StreamSets.HLS.Common); + tests = tests.concat(makeMvtMediaTests(testPause, engine, StreamSets.HLS.Common)); + tests = tests.concat(makeMvtMediaTests(testSetPosition, engine, StreamSets.HLS.Common)); // TODO: ONEM-26268 Fix Rate tests // tests = tests.concat(makeMvtMediaTests(testPlayRate, engine, StreamSets.HLS.Video, new Unstable("ONEM-26268"))); tests.push(new MvtMediaTest(testChangeAudioTracks, MS.HLS.FMP4_MULTIAUDIO, engine));