Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load text tracks on demand #6043

Merged
merged 1 commit into from
Nov 4, 2019
Merged

Commits on Nov 4, 2019

  1. Option to load text tracks on demand vs preload

    Reimplementation of videojs#2192
    on current code. Seems to work but has not been carefully tested,
    especially on conditions such as slow networks and complex tracks.
    
    For videojs#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
      }
    };
    bvibber committed Nov 4, 2019
    Configuration menu
    Copy the full SHA
    9ab12f8 View commit details
    Browse the repository at this point in the history