tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

track-mode-disabled.html (1247B)


      1 <!DOCTYPE html>
      2 <title>Cues are properly removed from the active cue list when their track changes mode to disabled</title>
      3 <script src="/common/media.js"></script>
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <video>
      7    <track src="resources/captions-gaps.vtt" kind="captions" default >
      8    <script>
      9    async_test(function(t) {
     10        var video = document.querySelector("video");
     11        var testTrack = document.querySelector("track");
     12 
     13        video.src = getVideoURI("/media/counting");
     14        video.oncanplaythrough = t.step_func(startTest);
     15        video.onseeked = t.step_func_done(seeked);
     16 
     17        function startTest() {
     18            // Set the mode of the text track to "showing".
     19            testTrack.track.mode = "showing";
     20            // Seek to a time with a caption.
     21            video.currentTime = 1.5;
     22        }
     23 
     24        function seeked() {
     25            // Set the mode of the text track to "hidden", then to "showing" again.
     26            testTrack.track.mode = "hidden";
     27            testTrack.track.mode = "showing";
     28 
     29            // Set the mode of the text track to "disabled".
     30            testTrack.track.mode = "disabled";
     31        }
     32    });
     33    </script>
     34 </video>