Add an UMA stat to be able to see if the User pods are show on start screen,
[chromium-blink-merge.git] / media / test / data / encrypted_frame_size_change.html
blob9b0f60f521bf30e75f3186aff62813285257fe1d
1 <!DOCTYPE html>
2 <html>
3 <body onload="load()">
4 <p>Tests decoding and rendering encrypted video element that has a changing
5 resolution.</p>
6 <video width=320 controls></video>
7 <video controls></video>
8 <script src='eme_player_js/app_loader.js' type='text/javascript'></script>
9 <script>
10 var firstVideoSeek = false;
11 var video_fixed_size = document.getElementsByTagName("video")[0];
12 var video = document.getElementsByTagName("video")[1];
13 var testConfig = new TestConfig();
14 testConfig.loadQueryParams();
16 function load() {
17 loadVideo(video_fixed_size).then(function() {
18 loadVideo(video);
19 });
22 function loadVideo(video) {
23 video.addEventListener('playing', function() {
24 // Make sure the video plays for a bit.
25 video.addEventListener('timeupdate', function() {
26 if (video.currentTime > 1.0) {
27 video.pause();
29 });
30 });
32 video.addEventListener('pause', function() {
33 video.addEventListener('seeked', function() {
34 if (!firstVideoSeek) {
35 Utils.timeLog('One video seeked.');
36 firstVideoSeek = true;
37 return;
39 Utils.setResultInTitle('ENDED');
40 });
41 video.currentTime = 0.5;
42 });
44 video.addEventListener('canplay', oncanplay);
46 var videoPlayer = PlayerUtils.createPlayer(video, testConfig);
47 return videoPlayer.init()
48 .then(function() { video.play(); })
49 .catch(function() { Utils.failTest('Unable to play video.'); });
51 </script>
52 </body>
53 </html>