tor-browser

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

non-visible-cue-with-region.html (766B)


      1 <!DOCTYPE html>
      2 <title>Box-less VTTCue attached to VTTRegion</title>
      3 <script src="/common/media.js"></script>
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <video></video>
      7 <script>
      8 setup(function() {
      9  window.video = document.querySelector('video');
     10  video.src = getVideoURI('/media/test');
     11 });
     12 async_test(function(t) {
     13  let track = video.addTextTrack('subtitles');
     14  let cue = new VTTCue(0, 1, '');
     15  cue.region = new VTTRegion();
     16  cue.onexit = t.step_func_done(function() {
     17    video.pause();
     18  });
     19  track.addCue(cue);
     20  video.onloadedmetadata = t.step_func(function() {
     21    video.currentTime = 0.8;
     22    video.play();
     23  });
     24  video.onended = t.unreached_func('test ends before video');
     25 });
     26 </script>