Renames ViewManagerDelegate::OnViewManagerDisconnected to OnViewManagerDestroyed
[chromium-blink-merge.git] / media / test / data / encrypted_frame_size_change.html
blobc6bf0ae24cbf82638d936bd6ef5e0563c491bffd
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;
15 function initTestConfig() {
16 testConfig = new TestConfig();
17 testConfig.loadQueryParams();
20 function load() {
21 initTestConfig();
22 loadVideo(video_fixed_size).then(function() {
23 loadVideo(video);
24 });
27 function loadVideo(video) {
28 video.addEventListener('playing', function() {
29 // Make sure the video plays for a bit.
30 video.addEventListener('timeupdate', function() {
31 if (video.currentTime > 1.0) {
32 video.pause();
34 });
35 });
37 video.addEventListener('pause', function() {
38 video.addEventListener('seeked', function() {
39 if (!firstVideoSeek) {
40 Utils.timeLog('One video seeked.');
41 firstVideoSeek = true;
42 return;
44 Utils.setResultInTitle('ENDED');
45 });
46 video.currentTime = 0.5;
47 });
49 video.addEventListener('canplay', oncanplay);
51 var videoPlayer = PlayerUtils.createPlayer(video, testConfig);
52 return videoPlayer.init()
53 .then(function() { video.play(); })
54 .catch(function() { Utils.failTest('Unable to play video.'); });
56 </script>
57 </body>
58 </html>