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

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

Issue 308553002: Integrate browser tests with new EME player. (Closed) Base URL: http://git.chromium.org/chromium/src.git@eme_player
Patch Set: nits (small change to EME versions UI) 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 // Widevine player responsible for playing media using Widevine key system 5 // Widevine player responsible for playing media using Widevine key system
6 // and prefixed EME API. 6 // and prefixed EME API.
7 function PrefixedWidevinePlayer() { 7 function PrefixedWidevinePlayer() {
8 } 8 }
9 9
10 PrefixedWidevinePlayer.prototype.init = function(video) { 10 PrefixedWidevinePlayer.prototype.init = function(video) {
11 InitPrefixedEMEPlayer(this, video); 11 InitPrefixedEMEPlayer(this, video);
12 }; 12 };
13 13
14 PrefixedWidevinePlayer.prototype.onWebkitKeyMessage = function(message) { 14 PrefixedWidevinePlayer.prototype.onWebkitKeyMessage = function(message) {
15 function onSuccess(response) { 15 function onSuccess(response) {
16 Utils.timeLog('Got license response', key);
17 var key = new Uint8Array(response); 16 var key = new Uint8Array(response);
18 Utils.timeLog('Adding key to sessionID: ' + message.sessionId); 17 Utils.timeLog('Adding key to sessionID: ' + message.sessionId, key);
19 message.target.webkitAddKey(TestConfig.keySystem, key, new Uint8Array(1), 18 message.target.webkitAddKey(TestConfig.keySystem, key, new Uint8Array(1),
20 message.sessionId); 19 message.sessionId);
21 } 20 }
22 Utils.sendRequest('POST', 'arraybuffer', message.message, 21 Utils.sendRequest('POST', 'arraybuffer', message.message,
23 TestConfig.licenseServer, onSuccess); 22 TestConfig.licenseServerURL, onSuccess,
23 TestConfig.forceInvalidResponse);
24 }; 24 };
OLDNEW
« no previous file with comments | « chrome/test/data/media/eme_player_js/prefixed_clearkey_player.js ('k') | chrome/test/data/media/eme_player_js/test_app.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698