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

Make gap controller wait for active fragments while seeking #4806

Merged
merged 2 commits into from
Jul 26, 2022

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Jul 21, 2022

This PR will...

Make the gap controller wait for active fragments that start before current position while seeking.

Why is this Pull Request needed?

When seeking to a point with 2 seconds (MAX_START_GAP_JUMP) before a buffered range, the gap-controller will seek to the start of that range without waiting for fragments to be loaded and appended that would fill the buffer. This change makes the gap controller wait so that rather than skipping ahead, it seeks to and plays the media from the main playlist at the initial seek point.

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

Only active fragments from the stream-controller (main playlist) are considered. Alternate audio track fragments are not included in the check. Generally audio segments are smaller and are delivered ahead of video, but this might not always be the case, so passing in both could be a good future enhancement (once the stream controller can monitor the audio stream controller, or the gap controller operates with access to both).

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 requested a review from itsjamie July 21, 2022 16:17
@robwalch
Copy link
Collaborator Author

@karendolan after merging #4667 I noticed even more that we were executing start gap seeks when seeking to a point before a buffered range. This should address that and give us more precise (although occasionally slower) seeking.

@robwalch
Copy link
Collaborator Author

Related to #2327.

@robwalch robwalch added this to the 1.2.0 milestone Jul 21, 2022
@robwalch robwalch changed the title Make gap controller wait for active fragments Make gap controller wait for active fragments while seeking Jul 21, 2022
@robwalch robwalch force-pushed the bugfix/wait-for-active-fragment-before-gap-seek branch from 87648e8 to 300cce6 Compare July 26, 2022 21:18
@robwalch robwalch merged commit 3010022 into master Jul 26, 2022
@robwalch robwalch deleted the bugfix/wait-for-active-fragment-before-gap-seek branch July 26, 2022 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant