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

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

Issue 2267283002: media: Separate renewal from default External Clear Key test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/eme_player_js/utils.js » ('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 // The PlayerUtils provides utility functions to binding common media events 5 // The PlayerUtils provides utility functions to binding common media events
6 // to specific player functions. It also provides functions to load media source 6 // to specific player functions. It also provides functions to load media source
7 // base on test configurations. 7 // base on test configurations.
8 var PlayerUtils = new function() { 8 var PlayerUtils = new function() {
9 } 9 }
10 10
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 return player; 137 return player;
138 }); 138 });
139 }; 139 };
140 140
141 // Return the appropriate player based on test configuration. 141 // Return the appropriate player based on test configuration.
142 PlayerUtils.createPlayer = function(video, testConfig) { 142 PlayerUtils.createPlayer = function(video, testConfig) {
143 function getPlayerType(keySystem) { 143 function getPlayerType(keySystem) {
144 switch (keySystem) { 144 switch (keySystem) {
145 case WIDEVINE_KEYSYSTEM: 145 case WIDEVINE_KEYSYSTEM:
146 return WidevinePlayer; 146 return WidevinePlayer;
147 case CLEARKEY:
147 case EXTERNAL_CLEARKEY: 148 case EXTERNAL_CLEARKEY:
148 case CLEARKEY: 149 case EXTERNAL_CLEARKEY_RENEWAL:
149 return ClearKeyPlayer; 150 return ClearKeyPlayer;
150 case FILE_IO_TEST_KEYSYSTEM: 151 case FILE_IO_TEST_KEYSYSTEM:
151 case OUTPUT_PROTECTION_TEST_KEYSYSTEM: 152 case OUTPUT_PROTECTION_TEST_KEYSYSTEM:
152 return UnitTestPlayer; 153 return UnitTestPlayer;
153 default: 154 default:
154 Utils.timeLog(keySystem + ' is not a known key system'); 155 Utils.timeLog(keySystem + ' is not a known key system');
155 return ClearKeyPlayer; 156 return ClearKeyPlayer;
156 } 157 }
157 } 158 }
158 var Player = getPlayerType(testConfig.keySystem); 159 var Player = getPlayerType(testConfig.keySystem);
159 return new Player(video, testConfig); 160 return new Player(video, testConfig);
160 }; 161 };
OLDNEW
« no previous file with comments | « media/test/data/eme_player_js/globals.js ('k') | media/test/data/eme_player_js/utils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698