tor-browser

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

track-cue-inline.html (538B)


      1 <!DOCTYPE html>
      2 <title>Add a track and change its mode through JS</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <video>
      6    <source src="/media/test.mp4" type="video/mp4">
      7    <source src="/media/test.webm" type="video/webm">
      8 </video>
      9 <script>
     10 test(function() {
     11    var video = document.querySelector('video');
     12    var track = video.addTextTrack('captions', 'English', 'en');
     13    track.addCue(new VTTCue(0.0, 10.0, 'wow wow'));
     14    track.mode = 'showing';
     15 });
     16 </script>