1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-02 06:32:07 +02:00
video.js/docs
Brion Vibber 0e37fbf02c feat: option to load text tracks on demand vs preload (#6043)
Reimplementation of https://github.com/videojs/video.js/pull/2192
on current code. Seems to work but has not been carefully tested,
especially on conditions such as slow networks and complex tracks.

For https://github.com/videojs/video.js/issues/5252

A `preloadTextTracks` tech option is added, set to true by default,
to keep current behavior intact. Alternate behavior can be enabled
by setting this to false.

This delays loading of the VTT cue files until they are selected.
For sites like Wikipedia that tend to have large numbers of
crowdsourced subtitles and can show many files together on one
page, this saves a lot of unnecessary network transfer and API
hits.

Does mean there may be dropped cues while switching to a track
that requires on-demand loading.

Example usage:

videojs(element, {
  html5: {
    preloadTextTracks: false
  }
};
2019-11-04 15:13:24 -05:00
..
examples docs: use https links (#5749) 2019-01-18 12:07:24 -05:00
guides feat: option to load text tracks on demand vs preload (#6043) 2019-11-04 15:13:24 -05:00
legacy-docs feat: add built-in Picture-in-Picture button (#6002) 2019-06-18 16:42:02 -04:00
index.md chore(https): update a lot of links to be https (#5372) 2018-08-10 15:13:32 -04:00
translations-needed.md fix(lang): Update Norwegian translations (#6220) 2019-10-07 12:23:36 -04:00