Bug 1943514 - Close the RC sidebar panel when users opt out of/turn off Review Checke...
[gecko.git] / dom / media / webvtt / test / reftest / vtt_overlapping_time.html
blobf973b398d565dc0f80808e361fa6995dccaf0546
1 <!DOCTYPE HTML>
2 <html class="reftest-wait">
3 <head>
4 </head>
5 <body>
6 <video id="v1" src="black.mp4" autoplay width="320" height="180">
7 <track label="English" src="cues_time_overlapping.webvtt" default>
8 </video>
9 <script type="text/javascript">
10 /**
11 * This test is to ensure that when cues with overlapping times, the one with
12 * earlier end timestamp should disappear when the media time reaches its
13 * end time. This vtt file contains two cues, the first cue is [0,1], the second
14 * cue is [0,4], so after video is playing over 1s, only cue2 should be displayed.
16 async function testTimeOverlappingCues() {
17 const video = document.getElementById("v1");
18 video.ontimeupdate = () => {
19 if (video.currentTime > 1.0) {
20 document.documentElement.removeAttribute('class');
21 video.ontimeupdate = null;
26 window.addEventListener("MozReftestInvalidate",
27 testTimeOverlappingCues);
28 </script>
29 </body>
30 </html>