tor-browser

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

track-cue-rendering-after-controls-removed-ref.html (818B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3 <script src="/common/reftest-wait.js"></script>
      4 <title>Text track cue layout after controls are removed (reference)</title>
      5 <style>
      6 ::cue {
      7  font-size: 50px;
      8 }
      9 
     10 video {
     11  border: 1px solid gray;
     12 }
     13 </style>
     14 <video onloadeddata="this.onloadeddata = null; takeScreenshot();">
     15  <source src="/media/white.webm" type="video/webm">
     16  <source src="/media/white.mp4" type="video/mp4">
     17 </video>
     18 <script>
     19 // Add a single cue at line -2, where it would be if there were controls visible
     20 // at the bottom. (This assumes that those controls are less than 50px high.)
     21 // cue at line -1.
     22 var video = document.querySelector("video");
     23 var track = video.addTextTrack("captions");
     24 var cue = new VTTCue(0, 1, "text");
     25 cue.line = -2;
     26 track.addCue(cue);
     27 track.mode = "showing";
     28 </script>
     29 </html>