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(llhls): watcher causes playback failure #1398

Merged
merged 3 commits into from
May 25, 2023
Merged

fix(llhls): watcher causes playback failure #1398

merged 3 commits into from
May 25, 2023

Conversation

adrums86
Copy link
Contributor

@adrums86 adrums86 commented May 19, 2023

Description

Low latency streams can get into a bad state on startup and fail if the seek position is adjusted with the playback watcher, specifically by fixesBadSeeks. There are checks in that function that determine if a seek position is outside the seekable window. This seekable range is a calculated interval duration from the playlist, where the end of the seekable window is the duration - HOLD-BACK. When the player first calculates the seekable range from the manifest, the interval duration returned is not precise. Sometimes this non-precise duration will be greater than the precise duration determined after the playlist is loaded. Since the player uses the first, non-precise duration calculation to determine the start position of a live asset, if the precise duration is updated to a lesser value before the player completes the seek to the start position this can cause the start position to fall outside of the "safe seek window". When combined with a manifest that utilizes #EXT-X-INDEPENDENT-SEGMENTS tags, this would cause the player to get stuck requesting the same partial segment in rapid succession, triggering playlist exclusion logic and eventual a fatal MEDIA_ERR_DECODE.

The PRs for #EXT-X-INDEPENDENT-SEGMENTS support are:
videojs/m3u8-parser#165
and
#1399

Specific Changes proposed

Adding an exclusion for LLHLS to allow for seeking beyond the "safe" seek window.

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
  • Reviewed by Two Core Contributors

@adrums86 adrums86 self-assigned this May 19, 2023
@codecov
Copy link

codecov bot commented May 19, 2023

Codecov Report

❗ No coverage uploaded for pull request base (main@f9a392f). Click here to learn what that means.
The diff coverage is 100.00%.

❗ Current head 4abadab differs from pull request most recent head 6c7eeae. Consider uploading reports for the commit 6c7eeae to get more accurate results

@@           Coverage Diff           @@
##             main    #1398   +/-   ##
=======================================
  Coverage        ?   85.47%           
=======================================
  Files           ?       40           
  Lines           ?    10026           
  Branches        ?     2320           
=======================================
  Hits            ?     8570           
  Misses          ?     1456           
  Partials        ?        0           
Impacted Files Coverage Δ
src/playback-watcher.js 98.34% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@adrums86 adrums86 marked this pull request as ready for review May 22, 2023 06:49
@adrums86 adrums86 merged commit 3580d1e into main May 25, 2023
@adrums86 adrums86 deleted the fix-llhls branch May 25, 2023 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants