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

Determine canSkip based on age of last playlist request #6300

Merged
merged 12 commits into from Apr 8, 2024

Conversation

mcintyrehh
Copy link
Contributor

@mcintyrehh mcintyrehh commented Mar 23, 2024

This PR will...

Determine whether the _HLS_skip param should be added based on the age of the last Level request. This check is also completed immediately before the next Level request.

Why is this Pull Request needed?

The previous getSkipValue logic was calculating the _HLS_skip param by comparing CAN-SKIP-UNTIL seconds, to snChangeGoal in segments.

This update proposes new logic to determine if we should skip segments based on the age of the last playlist request. The HLS Spec mentions the following in 6.3.7 - Requesting Playlist Delta Updates:

A Client SHOULD NOT request a Playlist Delta Update unless it already
has a version of the Playlist that is no older than one-half of the
Skip Boundary.

The getSkipValue method was previously getting called in the BasePlaylistController's playlistLoaded method, where the playlist age would be a fraction of a second. It has been moved into the loadPlaylist method to ensure that we are checking the age of the previous playlist call immediately before the new playlist request is made.

Are there any points in the code the reviewer needs to double check?

Delta Playlist stream I've been testing with from the THEO Player test page:
https://cdn-vos-ppp-01.vos360.video/Content/HLS_HLSCLEAR/Live/channel(PPP-LL-2HLS)/index.m3u8

I haven't tested with a stream that only has the CAN-SKIP-UNTIL directive and no CAN-BLOCK-RELOAD, so I'd like to test that case to make sure there are no regressions to: #3670

Resolves issues:

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

@robwalch robwalch added this to the 1.5.8 milestone Mar 23, 2024
src/controller/level-controller.ts Outdated Show resolved Hide resolved
robwalch
robwalch previously approved these changes Apr 3, 2024
robwalch
robwalch previously approved these changes Apr 4, 2024
@robwalch robwalch merged commit d802d60 into video-dev:master Apr 8, 2024
12 checks passed
robwalch pushed a commit that referenced this pull request Apr 10, 2024
robwalch added a commit that referenced this pull request Apr 11, 2024
* patch/v1.5.x:
  Bugfix: Patch for light player exception with audio groups (#6342)
  Do not use "levelCodec" to instantiate SourceBuffer when multiple audio codec strings are present in the Multivariant Playlist variant CODECS attribute with muxed content (#6341)
  Bugfix: preferManagedMediaSource:false when MSE is not present  (#6338)
  Determine canSkip based on age of last playlist request (#6300)
  API.md update removeLevel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants