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

Side by Side Diff: chrome/test/data/media/eme_player_js/prefixed_clearkey_player.js

Issue 332323003: Revert of Integrate browser tests with new EME player. (Closed) Base URL: http://git.chromium.org/chromium/src.git@eme_player
Patch Set: Created 6 years, 6 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
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 // ClearKey player responsible for playing media using Clear Key key system and 5 // ClearKey player responsible for playing media using Clear Key key system and
6 // prefixed EME API. 6 // prefixed EME API.
7 function PrefixedClearKeyPlayer() { 7 function PrefixedClearKeyPlayer() {
8 } 8 }
9 9
10 PrefixedClearKeyPlayer.prototype.init = function(video) { 10 PrefixedClearKeyPlayer.prototype.init = function(video) {
11 InitPrefixedEMEPlayer(this, video); 11 InitPrefixedEMEPlayer(this, video);
12 }; 12 };
13 13
14 PrefixedClearKeyPlayer.prototype.onWebkitKeyMessage = function(message) { 14 PrefixedClearKeyPlayer.prototype.onWebkitKeyMessage = function(message) {
15 var initData = Utils.getInitDataFromMessage(message, TestConfig.mediaType); 15 if (Utils.isHeartBeatMessage(message.message)) {
16 var key = Utils.getDefaultKey(TestConfig.forceInvalidResponse); 16 Utils.timeLog('onWebkitKeyMessage - heart beat', message);
17 return;
18 }
19 var initData = message.message;
20 // If content uses mp4, then message.message is PSSH data. Instead of parsing
21 // that data we hard code the initData.
22 if (TestConfig.mediaType.indexOf('mp4') != -1)
23 // Temporary hack for Clear Key in v0.1.
24 initData = Utils.convertToUint8Array(KEY_ID);
17 Utils.timeLog('Adding key to sessionID: ' + message.sessionId); 25 Utils.timeLog('Adding key to sessionID: ' + message.sessionId);
18 message.target.webkitAddKey(TestConfig.keySystem, key, initData, 26 message.target.webkitAddKey(TestConfig.keySystem, KEY, initData,
19 message.sessionId); 27 message.sessionId);
20 }; 28 };
OLDNEW
« no previous file with comments | « chrome/test/data/media/eme_player_js/player.js ('k') | chrome/test/data/media/eme_player_js/prefixed_widevine_player.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698