-
Notifications
You must be signed in to change notification settings - Fork 7.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: option to load text tracks on demand vs preload (#6043)
Reimplementation of #2192 on current code. Seems to work but has not been carefully tested, especially on conditions such as slow networks and complex tracks. For #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 } };
- Loading branch information
Showing
3 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters