videojs / videojs-playlist

Playlist plugin for videojs
Other
366 stars 124 forks source link

Problems with the 'textTracks' tag #196

Closed ghost closed 3 years ago

ghost commented 3 years ago

Could you show an accurate example of how to add 'textTracks' tag inside JavaScript code? I can't find a way to properly add the subtitle within these lines:

sources: [{ src: 'sample.mp4', type: 'video/mp4' }], poster: 'poster.jpg' }, textTracks where? and how?

gkatsev commented 3 years ago

Here's a more complete example: https://github.com/videojs/videojs.com/blob/main/src/components/HomeComponents/AdvancedExample/playlist.js

You can see a usage of text tracks in the elephants dream video.