webkitpy/autoinstalled/pyobjc_frameworks.py should not autoinstall frameworks if...
[WebKit-https.git] / PerformanceTests / Media / HLSGearChange.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../resources/runner.js"></script>
5 <script>
6 var video;
7 var url;
8
9 window.addEventListener('load', () => {
10     PerfTestRunner.prepareToMeasureValuesAsync({
11         unit: 'ms',
12         done: function () {
13             if (video) {
14                 video.src = null;
15                 video.load();
16             }
17         }
18     });
19
20     runTest();
21 });
22
23 function runTest() {   
24     video =  document.createElement('video');
25     document.body.appendChild(video);
26
27     video.src = 'hls/index.m3u8';
28     video.addEventListener('canplaythrough', () => {
29         video.play();
30         var startTime = PerfTestRunner.now();
31
32         video.addEventListener('resize', () => {
33             if (!PerfTestRunner.measureValueAsync(PerfTestRunner.now() - startTime))
34                 return;
35
36             document.body.removeChild(video);
37             PerfTestRunner.gc();
38             setTimeout(runTest, 0);
39         })
40     });
41 }
42
43 </script>
44 </head>
45 <body>
46     <button onclick="pauseAll()">pause</button><button onclick="playAll()">play</button><br>
47 </body>
48 </html>