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
3 // found in the LICENSE file.
5 // Widevine player responsible for playing media using Widevine key system
6 // and prefixed EME API.
7 function PrefixedWidevinePlayer() {
10 PrefixedWidevinePlayer.prototype.init = function(video) {
11 InitPrefixedEMEPlayer(this, video);
14 PrefixedWidevinePlayer.prototype.onWebkitKeyMessage = function(message) {
15 function onSuccess(response) {
16 var key = new Uint8Array(response);
17 Utils.timeLog('Adding key to sessionID: ' + message.sessionId, key);
18 message.target.webkitAddKey(TestConfig.keySystem, key, new Uint8Array(1),
21 Utils.sendRequest('POST', 'arraybuffer', message.message,
22 TestConfig.licenseServerURL, onSuccess,
23 TestConfig.forceInvalidResponse);