Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Side by Side Diff: media/test/data/eme_player_js/clearkey_player.js

Issue 1712903002: Remove prefixed EME. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix isRenewalMessage() in browser tests. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/test/data/eme_player_js/app_loader.js ('k') | media/test/data/eme_player_js/eme_app.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // ClearKeyPlayer responsible for playing media using Clear Key key system and 5 // ClearKeyPlayer responsible for playing media using Clear Key key system.
6 // the unprefixed version of EME.
7 function ClearKeyPlayer(video, testConfig) { 6 function ClearKeyPlayer(video, testConfig) {
8 this.video = video; 7 this.video = video;
9 this.testConfig = testConfig; 8 this.testConfig = testConfig;
10 } 9 }
11 10
12 ClearKeyPlayer.prototype.init = function() { 11 ClearKeyPlayer.prototype.init = function() {
13 // Returns a promise. 12 // Returns a promise.
14 return PlayerUtils.initEMEPlayer(this); 13 return PlayerUtils.initEMEPlayer(this);
15 }; 14 };
16 15
17 ClearKeyPlayer.prototype.registerEventListeners = function() { 16 ClearKeyPlayer.prototype.registerEventListeners = function() {
18 // Returns a promise. 17 // Returns a promise.
19 return PlayerUtils.registerEMEEventListeners(this); 18 return PlayerUtils.registerEMEEventListeners(this);
20 }; 19 };
21 20
22 ClearKeyPlayer.prototype.onMessage = function(message) { 21 ClearKeyPlayer.prototype.onMessage = function(message) {
23 Utils.timeLog('MediaKeySession onMessage', message); 22 Utils.timeLog('MediaKeySession onMessage', message);
24 var keyId = Utils.extractFirstLicenseKeyId(message.message); 23 var keyId = Utils.extractFirstLicenseKeyId(message.message);
25 var key = Utils.getDefaultKey(this.testConfig.forceInvalidResponse); 24 var key = Utils.getDefaultKey(this.testConfig.forceInvalidResponse);
26 var jwkSet = Utils.createJWKData(keyId, key); 25 var jwkSet = Utils.createJWKData(keyId, key);
27 Utils.timeLog('Calling update: ' + String.fromCharCode.apply(null, jwkSet)); 26 Utils.timeLog('Calling update: ' + String.fromCharCode.apply(null, jwkSet));
28 message.target.update(jwkSet).catch(function(error) { 27 message.target.update(jwkSet).catch(function(error) {
29 // Ignore the error if a crash is expected. This ensures that the decoder 28 // Ignore the error if a crash is expected. This ensures that the decoder
30 // actually detects and reports the error. 29 // actually detects and reports the error.
31 if (this.testConfig.keySystem != 'org.chromium.externalclearkey.crash') { 30 if (this.testConfig.keySystem != 'org.chromium.externalclearkey.crash') {
32 Utils.failTest(error, EME_UPDATE_FAILED); 31 Utils.failTest(error, EME_UPDATE_FAILED);
33 } 32 }
34 }); 33 });
35 }; 34 };
OLDNEW
« no previous file with comments | « media/test/data/eme_player_js/app_loader.js ('k') | media/test/data/eme_player_js/eme_app.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698