Skip to content

Commit

Permalink
Demo asset cleanup
Browse files Browse the repository at this point in the history
 - Alphabetize key systems
 - Disable failing YT Oops asset on PlayReady
 - Fix playback of YT Oops asset on Chrome by updating
   request/responseFilter usage in integration tests
 - Correct feature set of Axinom assets
 - Ignore text failures on Axinom assets
   - Builds on the new config introduced in 3a27656 to work around
     Axinom/public-test-vectors#1

Change-Id: I795bbeb181c507d23fec3e42867d9c4bc4b5a197
  • Loading branch information
joeyparrish committed Aug 25, 2016
1 parent 3a27656 commit 678e652
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 26 deletions.
69 changes: 47 additions & 22 deletions demo/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ shakaAssets.Source = {
/** @enum {string} */
shakaAssets.KeySystem = {
CLEAR_KEY: 'org.w3.clearkey',
WIDEVINE: 'com.widevine.alpha',
PLAYREADY: 'com.microsoft.playready'
PLAYREADY: 'com.microsoft.playready',
WIDEVINE: 'com.widevine.alpha'
};


Expand Down Expand Up @@ -132,7 +132,9 @@ shakaAssets.ExtraText;
* requestFilter: (shaka.net.NetworkingEngine.RequestFilter|undefined),
* responseFilter: (shaka.net.NetworkingEngine.ResponseFilter|undefined),
* drmCallback: (shakaExtern.DashContentProtectionCallback|undefined),
* clearKeys: (!Object.<string, string>|undefined)
* clearKeys: (!Object.<string, string>|undefined),
*
* extraConfig: (Object|undefined)
* }}
*
* @property {string} name
Expand Down Expand Up @@ -172,6 +174,9 @@ shakaAssets.ExtraText;
* A callback to use to interpret ContentProtection elements.
* @property {(!Object.<string, string>|undefined)} clearKeys
* A map of key-id to key to use with clear-key encryption.
*
* @property {(Object|undefined)} extraConfig
* Arbitrary player config to be applied after all other settings.
*/
shakaAssets.AssetInfo;
// }}}
Expand Down Expand Up @@ -528,9 +533,9 @@ shakaAssets.testAssets = [
encoder: shakaAssets.Encoder.YOUTUBE,
source: shakaAssets.Source.YOUTUBE,
drm: [
shakaAssets.KeySystem.WIDEVINE,
// TODO: Still failing on PlayReady, investigate
shakaAssets.KeySystem.PLAYREADY
// TODO: Failing on PlayReady with error 8004b896, investigate
//shakaAssets.KeySystem.PLAYREADY,
shakaAssets.KeySystem.WIDEVINE
],
features: [
shakaAssets.Feature.MP4,
Expand All @@ -552,14 +557,16 @@ shakaAssets.testAssets = [
encoder: shakaAssets.Encoder.AXINOM,
source: shakaAssets.Source.AXINOM,
drm: [
shakaAssets.KeySystem.WIDEVINE,
shakaAssets.KeySystem.PLAYREADY
shakaAssets.KeySystem.PLAYREADY,
shakaAssets.KeySystem.WIDEVINE
],
features: [
shakaAssets.Feature.EMBEDDED_TEXT,
shakaAssets.Feature.HIGH_DEFINITION,
shakaAssets.Feature.MP4,
shakaAssets.Feature.SEGMENT_TEMPLATE_DURATION,
shakaAssets.Feature.ULTRA_HIGH_DEFINITION
shakaAssets.Feature.ULTRA_HIGH_DEFINITION,
shakaAssets.Feature.WEBVTT
],

licenseServers: {
Expand All @@ -568,7 +575,10 @@ shakaAssets.testAssets = [
},
licenseRequestHeaders: {
'X-AxDRM-Message': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZXJzaW9uIjoxLCJjb21fa2V5X2lkIjoiNjllNTQwODgtZTllMC00NTMwLThjMWEtMWViNmRjZDBkMTRlIiwibWVzc2FnZSI6eyJ0eXBlIjoiZW50aXRsZW1lbnRfbWVzc2FnZSIsImtleXMiOlt7ImlkIjoiNmU1YTFkMjYtMjc1Ny00N2Q3LTgwNDYtZWFhNWQxZDM0YjVhIn1dfX0.yF7PflOPv9qHnu3ZWJNZ12jgkqTabmwXbDWk_47tLNE' // gjslint: disable=110
}
},

// See https://github.com/Axinom/dash-test-vectors/issues/1
extraConfig: { streaming: { ignoreTextStreamFailures: true } }
},
{
name: 'Multi-DRM, multi-key',
Expand All @@ -577,15 +587,17 @@ shakaAssets.testAssets = [
encoder: shakaAssets.Encoder.AXINOM,
source: shakaAssets.Source.AXINOM,
drm: [
shakaAssets.KeySystem.WIDEVINE,
shakaAssets.KeySystem.PLAYREADY
shakaAssets.KeySystem.PLAYREADY,
shakaAssets.KeySystem.WIDEVINE
],
features: [
shakaAssets.Feature.EMBEDDED_TEXT,
shakaAssets.Feature.HIGH_DEFINITION,
shakaAssets.Feature.MP4,
shakaAssets.Feature.MULTIKEY,
shakaAssets.Feature.SEGMENT_TEMPLATE_DURATION,
shakaAssets.Feature.ULTRA_HIGH_DEFINITION
shakaAssets.Feature.ULTRA_HIGH_DEFINITION,
shakaAssets.Feature.WEBVTT
],

licenseServers: {
Expand All @@ -594,7 +606,10 @@ shakaAssets.testAssets = [
},
licenseRequestHeaders: {
'X-AxDRM-Message': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZXJzaW9uIjoxLCJjb21fa2V5X2lkIjoiNjllNTQwODgtZTllMC00NTMwLThjMWEtMWViNmRjZDBkMTRlIiwibWVzc2FnZSI6eyJ0eXBlIjoiZW50aXRsZW1lbnRfbWVzc2FnZSIsImtleXMiOlt7ImlkIjoiMTUzMGQzYTAtNjkwNC00NDZhLTkxYTEtMzNhMTE1YWE4YzQxIn0seyJpZCI6ImM4M2ViNjM5LWU2NjQtNDNmOC1hZTk4LTQwMzliMGMxM2IyZCJ9LHsiaWQiOiIzZDhjYzc2Mi0yN2FjLTQwMGYtOTg5Zi04YWI1ZGM3ZDc3NzUifSx7ImlkIjoiYmQ4ZGFkNTgtMDMyZC00YzI1LTg5ZmEtYzdiNzEwZTgyYWMyIn1dfX0.9t18lFmZFVHMzpoZxYDyqOS0Bk_evGhTBw_F2JnAK2k' // gjslint: disable=110
}
},

// See https://github.com/Axinom/dash-test-vectors/issues/1
extraConfig: { streaming: { ignoreTextStreamFailures: true } }
},
{
name: 'Multi-DRM, multi-key, multi-Period',
Expand All @@ -607,16 +622,18 @@ shakaAssets.testAssets = [
encoder: shakaAssets.Encoder.AXINOM,
source: shakaAssets.Source.AXINOM,
drm: [
shakaAssets.KeySystem.WIDEVINE,
shakaAssets.KeySystem.PLAYREADY
shakaAssets.KeySystem.PLAYREADY,
shakaAssets.KeySystem.WIDEVINE
],
features: [
shakaAssets.Feature.EMBEDDED_TEXT,
shakaAssets.Feature.HIGH_DEFINITION,
shakaAssets.Feature.MP4,
shakaAssets.Feature.MULTIKEY,
shakaAssets.Feature.MULTIPERIOD,
shakaAssets.Feature.SEGMENT_TEMPLATE_DURATION,
shakaAssets.Feature.ULTRA_HIGH_DEFINITION
shakaAssets.Feature.ULTRA_HIGH_DEFINITION,
shakaAssets.Feature.WEBVTT
],

licenseServers: {
Expand All @@ -625,7 +642,10 @@ shakaAssets.testAssets = [
},
licenseRequestHeaders: {
'X-AxDRM-Message': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2ZXJzaW9uIjoxLCJjb21fa2V5X2lkIjoiNjllNTQwODgtZTllMC00NTMwLThjMWEtMWViNmRjZDBkMTRlIiwibWVzc2FnZSI6eyJ0eXBlIjoiZW50aXRsZW1lbnRfbWVzc2FnZSIsImtleXMiOlt7ImlkIjoiNTNiZTc3NTctNzI4OC00YjZiLWIyMGEtZjA1YjY0YTRlZjc5In0seyJpZCI6IjBlZDgyMWE4LTgwZWQtNDBhYy1hODA0LTkyN2M5ZmRhZGJlOSJ9LHsiaWQiOiJlNDdkNzhjYS05NGRjLTQ1ZmItOWUzZC0yYTc3M2FlZjc0YjIifSx7ImlkIjoiMzJhMTQxZTktMjNhYi00NGZmLWE2YzctNTM0OWM4OTQ1MWNmIn0seyJpZCI6IjhkMDkxOTY2LTQ0YjUtNGNmOC04YTQ1LWVkMTJmZGIxOGQzNSJ9XX19.9YSK6QsDr4SYR7Q74ftq9mVtsT0ZkP3STE0zI-3mVIA' // gjslint: disable=110
}
},

// See https://github.com/Axinom/dash-test-vectors/issues/1
extraConfig: { streaming: { ignoreTextStreamFailures: true } }
},
{
name: 'Multi-Period',
Expand All @@ -635,12 +655,17 @@ shakaAssets.testAssets = [
source: shakaAssets.Source.AXINOM,
drm: [],
features: [
shakaAssets.Feature.EMBEDDED_TEXT,
shakaAssets.Feature.HIGH_DEFINITION,
shakaAssets.Feature.MP4,
shakaAssets.Feature.MULTIPERIOD,
shakaAssets.Feature.SEGMENT_TEMPLATE_DURATION,
shakaAssets.Feature.ULTRA_HIGH_DEFINITION
]
shakaAssets.Feature.ULTRA_HIGH_DEFINITION,
shakaAssets.Feature.WEBVTT
],

// See https://github.com/Axinom/dash-test-vectors/issues/1
extraConfig: { streaming: { ignoreTextStreamFailures: true } }
},
// }}}

Expand Down Expand Up @@ -841,8 +866,8 @@ shakaAssets.testAssets = [
encoder: shakaAssets.Encoder.AZURE_MEDIA_SERVICES,
source: shakaAssets.Source.AZURE_MEDIA_SERVICES,
drm: [
shakaAssets.KeySystem.WIDEVINE,
shakaAssets.KeySystem.PLAYREADY
shakaAssets.KeySystem.PLAYREADY,
shakaAssets.KeySystem.WIDEVINE
],
features: [
shakaAssets.Feature.MP4,
Expand Down
3 changes: 3 additions & 0 deletions demo/demo_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ ShakaDemoUtils.setupAssetMetadata = function(asset, player) {
networkingEngine.registerRequestFilter(asset.requestFilter);
if (asset.responseFilter)
networkingEngine.registerResponseFilter(asset.responseFilter);
if (asset.extraConfig)
player.configure(/** @type {shakaExtern.PlayerConfiguration} */(
asset.extraConfig));
};


Expand Down
11 changes: 7 additions & 4 deletions test/player_integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,13 @@ describe('Player', function() {
addLicenseRequestHeaders.bind(null, asset.licenseRequestHeaders));
}

if (asset.licenseProcessor) {
player.getNetworkingEngine().registerResponseFilter(
asset.licenseProcessor);
}
var networkingEngine = player.getNetworkingEngine();
if (asset.requestFilter)
networkingEngine.registerRequestFilter(asset.requestFilter);
if (asset.responseFilter)
networkingEngine.registerResponseFilter(asset.responseFilter);
if (asset.extraConfig)
player.configure(asset.extraConfig);

player.load(asset.manifestUri).then(function() {
expect(player.isLive()).toEqual(isLive);
Expand Down

0 comments on commit 678e652

Please sign in to comment.