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

fix: Fix VTT cue timing in HLS #4217

Merged

Commits on May 11, 2022

  1. fix: Fix VTT cue timing in HLS

    Since the transition to sequence mode for HLS in v4.0.0, VTT cue
    timings were broken.  This is mainly because VTT cue timing in HLS is
    meant to be based on an offset from the media timestamps, and we
    generally don't know those now that we use sequence mode.
    
    To fix it, this change uses MediaSource segment mode for the very
    first video segment as a way to extract the timestamp, then clears the
    buffer, switches to sequence mode, and appends it again.  This lets us
    get the timing data we need, while avoiding major drawbacks of the
    previous HLS implementation:
     - We don't need to fetch segments upfront (which is high latency)
     - We don't need to fetch segments twice (once for timestamps, and
       once again to buffer)
     - We don't need to maintain parsers (which were complex and limited
       the formats we could support)
    
    Closes shaka-project#4191
    joeyparrish committed May 11, 2022
    Configuration menu
    Copy the full SHA
    ba0be14 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f9d7e38 View commit details
    Browse the repository at this point in the history