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

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

Issue 2543623003: media: Allow config change between clear and encrypted streams (Closed)
Patch Set: comments addressed Created 3 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/globals.js ('k') | media/test/data/mse_config_change.html » ('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 // Test configuration used by test page to configure the player app and other 5 // Test configuration used by test page to configure the player app and other
6 // test specific configurations. 6 // test specific configurations.
7 function TestConfig() { 7 function TestConfig() {
8 this.mediaFile = null; 8 this.mediaFile = null;
9 this.keySystem = null; 9 this.keySystem = null;
10 this.mediaType = null; 10 this.mediaType = null;
11 this.licenseServerURL = null; 11 this.licenseServerURL = null;
12 this.useMSE = false; 12 this.useMSE = false;
13 this.runFPS = false; 13 this.runFPS = false;
14 this.playTwice = false; 14 this.playTwice = false;
15 this.configChangeType = CONFIG_CHANGE_TYPE.CLEAR_TO_CLEAR;
15 } 16 }
16 17
17 TestConfig.prototype.loadQueryParams = function() { 18 TestConfig.prototype.loadQueryParams = function() {
18 // Load query parameters and set default values. 19 // Load query parameters and set default values.
19 var r = /([^&=]+)=?([^&]*)/g; 20 var r = /([^&=]+)=?([^&]*)/g;
20 // Lambda function for decoding extracted match values. Replaces '+' with 21 // Lambda function for decoding extracted match values. Replaces '+' with
21 // space so decodeURIComponent functions properly. 22 // space so decodeURIComponent functions properly.
22 var decodeURI = function decodeURI(s) { 23 var decodeURI = function decodeURI(s) {
23 return decodeURIComponent(s.replace(/\+/g, ' ')); 24 return decodeURIComponent(s.replace(/\+/g, ' '));
24 }; 25 };
(...skipping 27 matching lines...) Expand all
52 // Reload test configuration from document. 53 // Reload test configuration from document.
53 this.mediaFile = document.getElementById(MEDIA_FILE_ELEMENT_ID).value; 54 this.mediaFile = document.getElementById(MEDIA_FILE_ELEMENT_ID).value;
54 this.keySystem = document.getElementById(KEYSYSTEM_ELEMENT_ID).value; 55 this.keySystem = document.getElementById(KEYSYSTEM_ELEMENT_ID).value;
55 this.mediaType = document.getElementById(MEDIA_TYPE_ELEMENT_ID).value; 56 this.mediaType = document.getElementById(MEDIA_TYPE_ELEMENT_ID).value;
56 this.useMSE = document.getElementById(USE_MSE_ELEMENT_ID).value == 'true'; 57 this.useMSE = document.getElementById(USE_MSE_ELEMENT_ID).value == 'true';
57 this.playTwice = 58 this.playTwice =
58 document.getElementById(USE_PLAY_TWICE_ELEMENT_ID).value == 'true'; 59 document.getElementById(USE_PLAY_TWICE_ELEMENT_ID).value == 'true';
59 this.licenseServerURL = 60 this.licenseServerURL =
60 document.getElementById(LICENSE_SERVER_ELEMENT_ID).value; 61 document.getElementById(LICENSE_SERVER_ELEMENT_ID).value;
61 }; 62 };
OLDNEW
« no previous file with comments | « media/test/data/eme_player_js/globals.js ('k') | media/test/data/mse_config_change.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698