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

Side by Side Diff: chrome/test/data/media/eme_player_js/widevine_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
« no previous file with comments | « chrome/test/data/media/eme_player_js/utils.js ('k') | no next file » | 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 // Widevine player responsible for playing media using Widevine key system 5 // Widevine player responsible for playing media using Widevine key system
6 // and EME working draft API. 6 // and EME working draft API.
7 function WidevinePlayer() { 7 function WidevinePlayer() {
8 } 8 }
9 9
10 WidevinePlayer.prototype.init = function(video) { 10 WidevinePlayer.prototype.init = function(video) {
11 InitEMEPlayer(this, video); 11 InitEMEPlayer(this, video);
12 }; 12 };
13 13
14 WidevinePlayer.prototype.onMessage = function(message) { 14 WidevinePlayer.prototype.onMessage = function(message) {
15 Utils.timeLog('MediaKeySession onMessage', message); 15 Utils.timeLog('MediaKeySession onMessage', message);
16 var mediaKeySession = message.target; 16 var mediaKeySession = message.target;
17
17 function onSuccess(response) { 18 function onSuccess(response) {
18 var key = new Uint8Array(response); 19 var key = new Uint8Array(response);
19 Utils.timeLog('Update media key session with license response.', key); 20 Utils.timeLog('Update media key session with license response.', key);
20 mediaKeySession.update(key); 21 mediaKeySession.update(key);
21 } 22 }
22 Utils.sendRequest('POST', 'arraybuffer', message.message, 23 Utils.sendRequest('POST', 'arraybuffer', message.message,
23 TestConfig.licenseServerURL, onSuccess, 24 TestConfig.licenseServer, onSuccess);
24 TestConfig.forceInvalidResponse);
25 }; 25 };
OLDNEW
« no previous file with comments | « chrome/test/data/media/eme_player_js/utils.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698