| OLD | NEW |
| 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 // This file contains global constant variables used by the application. | 5 // This file contains global constant variables used by the application. |
| 6 | 6 |
| 7 // Renewal message header. External Clear Key implementation returns this as | 7 // Renewal message header. External Clear Key implementation returns this as |
| 8 // part of renewal messages. | 8 // part of renewal messages. |
| 9 var EME_RENEWAL_MESSAGE_HEADER = 'RENEWAL'; | 9 var EME_RENEWAL_MESSAGE_HEADER = 'RENEWAL'; |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 'org.chromium.externalclearkey.platformverificationtest'; | 46 'org.chromium.externalclearkey.platformverificationtest'; |
| 47 var CRASH_TEST_KEYSYSTEM = 'org.chromium.externalclearkey.crash'; | 47 var CRASH_TEST_KEYSYSTEM = 'org.chromium.externalclearkey.crash'; |
| 48 | 48 |
| 49 // Key system name:value map to show on the document page. | 49 // Key system name:value map to show on the document page. |
| 50 var KEY_SYSTEMS = { | 50 var KEY_SYSTEMS = { |
| 51 'Widevine': WIDEVINE_KEYSYSTEM, | 51 'Widevine': WIDEVINE_KEYSYSTEM, |
| 52 'Clearkey': CLEARKEY, | 52 'Clearkey': CLEARKEY, |
| 53 'External Clearkey': EXTERNAL_CLEARKEY | 53 'External Clearkey': EXTERNAL_CLEARKEY |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 var CONFIG_CHANGE_TYPE = { |
| 57 CLEAR_TO_CLEAR : '0', |
| 58 CLEAR_TO_ENCRYPTED : '1', |
| 59 ENCRYPTED_TO_CLEAR : '2', |
| 60 ENCRYPTED_TO_ENCRYPTED : '3' |
| 61 }; |
| 62 |
| 56 // General WebM and MP4 name:content_type map to show on the document page. | 63 // General WebM and MP4 name:content_type map to show on the document page. |
| 57 var MEDIA_TYPES = { | 64 var MEDIA_TYPES = { |
| 58 'WebM - Audio Video': 'video/webm; codecs="vorbis, vp8"', | 65 'WebM - Audio Video': 'video/webm; codecs="vorbis, vp8"', |
| 59 'WebM - Video Only': 'video/webm; codecs="vp8"', | 66 'WebM - Video Only': 'video/webm; codecs="vp8"', |
| 60 'WebM - Audio Only': 'video/webm; codecs="vorbis"', | 67 'WebM - Audio Only': 'video/webm; codecs="vorbis"', |
| 61 'MP4 - Video Only': 'video/mp4; codecs="avc1.4D000C"', | 68 'MP4 - Video Only': 'video/mp4; codecs="avc1.4D000C"', |
| 62 'MP4 - Audio Only': 'audio/mp4; codecs="mp4a.40.2"' | 69 'MP4 - Audio Only': 'audio/mp4; codecs="mp4a.40.2"' |
| 63 }; | 70 }; |
| 64 | 71 |
| 65 // Global document elements ID's. | 72 // Global document elements ID's. |
| 66 var VIDEO_ELEMENT_ID = 'video'; | 73 var VIDEO_ELEMENT_ID = 'video'; |
| 67 var MEDIA_FILE_ELEMENT_ID = 'mediaFile'; | 74 var MEDIA_FILE_ELEMENT_ID = 'mediaFile'; |
| 68 var LICENSE_SERVER_ELEMENT_ID = 'licenseServer'; | 75 var LICENSE_SERVER_ELEMENT_ID = 'licenseServer'; |
| 69 var KEYSYSTEM_ELEMENT_ID = 'keySystemList'; | 76 var KEYSYSTEM_ELEMENT_ID = 'keySystemList'; |
| 70 var MEDIA_TYPE_ELEMENT_ID = 'mediaTypeList'; | 77 var MEDIA_TYPE_ELEMENT_ID = 'mediaTypeList'; |
| 71 var USE_MSE_ELEMENT_ID = 'useMSE'; | 78 var USE_MSE_ELEMENT_ID = 'useMSE'; |
| 72 var USE_PLAY_TWICE_ELEMENT_ID = 'playTwice'; | 79 var USE_PLAY_TWICE_ELEMENT_ID = 'playTwice'; |
| 73 | 80 |
| 74 // These variables get updated every second, so better to have global pointers. | 81 // These variables get updated every second, so better to have global pointers. |
| 75 var decodedFPSElement = document.getElementById('decodedFPS'); | 82 var decodedFPSElement = document.getElementById('decodedFPS'); |
| 76 var droppedFPSElement = document.getElementById('droppedFPS'); | 83 var droppedFPSElement = document.getElementById('droppedFPS'); |
| 77 var droppedFramesElement = document.getElementById('droppedFrames'); | 84 var droppedFramesElement = document.getElementById('droppedFrames'); |
| 78 var docLogs = document.getElementById('logs'); | 85 var docLogs = document.getElementById('logs'); |
| OLD | NEW |