Skip to content

Commit

Permalink
Merge pull request video-dev#1573 from azu/add-firefox-blacklist-eme
Browse files Browse the repository at this point in the history
fix(func-test): add "firefox" to blacklist of angelOneShakaWidevine
  • Loading branch information
azu authored Feb 20, 2018
2 parents 42ab684 + cb6e22e commit b072eb2
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions tests/test-streams.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/**
* Create test stream
* @param {string} url
* @param {string} description
* @param {boolean} [live]
* @param {boolean} [abr]
* @param {string[]} [blacklist_ua]
* @returns {{url: string, description: string, live: boolean, abr: boolean, blacklist_ua: string[]}}
*/
function createTestStream(url, description, live = false, abr = true, blacklist_ua = []) {
return {
url,
Expand All @@ -8,8 +17,8 @@ function createTestStream(url, description, live = false, abr = true, blacklist_
}
}

function createTestStreamWithConfig(url, description, config) {
const testStream = createTestStream(url, description);
function createTestStreamWithConfig(target, config) {
const testStream = createTestStream(target.url, target.description, target.live, target.abr, target.blacklist_ua);

testStream.config = config;

Expand Down Expand Up @@ -108,15 +117,17 @@ module.exports = {
"abr": false
},
uspHLSAteam: createTestStream(
"http://demo.unified-streaming.com/video/ateam/ateam.ism/ateam.m3u8?session_id=27199",
"A-Team movie trailer - HLS by Unified Streaming Platform"
"http://demo.unified-streaming.com/video/ateam/ateam.ism/ateam.m3u8?session_id=27199",
"A-Team movie trailer - HLS by Unified Streaming Platform"
),
angelOneShakaWidevine: createTestStreamWithConfig(
"https://storage.googleapis.com/shaka-demo-assets/angel-one-widevine-hls/hls.m3u8",
"Shaka-packager Widevine DRM (EME) HLS-fMP4 - Angel One Demo",
angelOneShakaWidevine: createTestStreamWithConfig({
url: "https://storage.googleapis.com/shaka-demo-assets/angel-one-widevine-hls/hls.m3u8",
description: "Shaka-packager Widevine DRM (EME) HLS-fMP4 - Angel One Demo",
blacklist_ua: ["firefox"]
},
{
widevineLicenseUrl: "https://cwip-shaka-proxy.appspot.com/no_auth",
emeEnabled: true,
}
)
}
};

0 comments on commit b072eb2

Please sign in to comment.