2

I want to display captions using the HTML5 Text Tracks API (WebVTT) using the native browser implementations -- without loading audio/video.

How can that be achieved ?

DannyZB
  • 523
  • 2
  • 16

1 Answers1

0

There is no way using the native implementation.

However, the Firefox implementation of WebVTT, vtt.js, is publicly available.

All you need to do is attach a timer while a video element is playing (or just to any custom event without a video) and apply vtt.js functions to the video / captions container.

Since the Firefox VTT implementation is derived from it, this is the closest you can come to native without using the default way of attaching to a video.

approxiblue
  • 6,982
  • 16
  • 51
  • 59
DannyZB
  • 523
  • 2
  • 16