OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <title>Test media source config changes.</title> | 3 <title>Test media source config changes.</title> |
4 </head> | 4 </head> |
5 <body onload="runTest();"> | 5 <body onload="runTest();"> |
6 <video controls></video> | 6 <video controls></video> |
7 <script src='eme_player_js/app_loader.js' type='text/javascript'></script> | 7 <script src='eme_player_js/app_loader.js' type='text/javascript'></script> |
8 <script type="text/javascript"> | 8 <script type="text/javascript"> |
9 var testConfig = new TestConfig(); | 9 var testConfig = new TestConfig(); |
10 testConfig.loadQueryParams(); | 10 testConfig.loadQueryParams(); |
11 testConfig.useMSE = '1'; | |
12 var runEncrypted = testConfig.runEncrypted == 1; | 11 var runEncrypted = testConfig.runEncrypted == 1; |
13 | 12 |
14 var video = document.querySelector('video'); | 13 var video = document.querySelector('video'); |
15 var mediaType = 'video/webm; codecs="vorbis, vp8"'; | 14 var mediaType = 'video/webm; codecs="vorbis, vp8"'; |
16 | 15 |
17 var MEDIA_1 = 'bear-320x240.webm'; | 16 var MEDIA_1 = 'bear-320x240.webm'; |
18 var MEDIA_2 = 'bear-640x360.webm'; | 17 var MEDIA_2 = 'bear-640x360.webm'; |
19 if (runEncrypted) { | 18 if (runEncrypted) { |
20 MEDIA_1 = 'bear-320x240-av-enc_av.webm'; | 19 MEDIA_1 = 'bear-320x240-av_enc-av.webm'; |
21 MEDIA_2 = 'bear-640x360-av-enc_av.webm'; | 20 MEDIA_2 = 'bear-640x360-av_enc-av.webm'; |
22 } | 21 } |
23 | 22 |
24 var MEDIA_1_WIDTH = 320; | 23 var MEDIA_1_WIDTH = 320; |
25 var MEDIA_1_HEIGHT = 240; | 24 var MEDIA_1_HEIGHT = 240; |
26 | 25 |
27 var MEDIA_2_WIDTH = 640; | 26 var MEDIA_2_WIDTH = 640; |
28 var MEDIA_2_HEIGHT = 360; | 27 var MEDIA_2_HEIGHT = 360; |
29 var MEDIA_2_LENGTH = 2.75; | 28 var MEDIA_2_LENGTH = 2.75; |
30 | 29 |
31 // The time in secs to append the second media source. | 30 // The time in secs to append the second media source. |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 var emePlayer = PlayerUtils.createPlayer(video, testConfig); | 125 var emePlayer = PlayerUtils.createPlayer(video, testConfig); |
127 emePlayer.registerEventListeners(); | 126 emePlayer.registerEventListeners(); |
128 } | 127 } |
129 var mediaSource = MediaSourceUtils.loadMediaSource( | 128 var mediaSource = MediaSourceUtils.loadMediaSource( |
130 MEDIA_1, mediaType, appendNextSource); | 129 MEDIA_1, mediaType, appendNextSource); |
131 video.src = window.URL.createObjectURL(mediaSource); | 130 video.src = window.URL.createObjectURL(mediaSource); |
132 } | 131 } |
133 </script> | 132 </script> |
134 </body> | 133 </body> |
135 </html> | 134 </html> |
OLD | NEW |