-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix: Improve boundary gap mitigation at DASH period transitions #8344
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
Merged
avelad
merged 12 commits into
shaka-project:main
from
matvp91:boundary-reset-stall-on-end
Mar 28, 2025
Merged
fix: Improve boundary gap mitigation at DASH period transitions #8344
avelad
merged 12 commits into
shaka-project:main
from
matvp91:boundary-reset-stall-on-end
Mar 28, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
avelad
reviewed
Mar 26, 2025
avelad
reviewed
Mar 26, 2025
avelad
reviewed
Mar 26, 2025
Incremental code coverage: 100.00% |
@matvp91 is it ready to review? If yes, please, switch draft to ready! |
@shaka-bot test |
@avelad: Lab tests started with arguments:
|
@shaka-bot test |
@avelad: Lab tests started with arguments:
|
avelad
approved these changes
Mar 28, 2025
avelad
pushed a commit
that referenced
this pull request
Mar 31, 2025
With resetting MSE on boundary crossing, we might seek into a gap. This would cause MSE not to reset properly, and playback will stall. The following changes are made: - We rely on `seeking` to check if we need to start the boundary timer. The timer assumes we will cross a boundary in a short period of time, and is built to handle edge cases like misalignment & subtle gaps. We first relied on `seeked` but that event might never come when MSE does not reset. Thus seeking into a gap near a boundary end would have never spawned the timer in the first place, leaving the player endlessly stalling. - When crossing a boundary, the MSE resets but never completes (as explained earlier). In this case, the timer will advance the playhead. However, due to the incomplete MSE reset, the video element remains paused. Since the previous state was paused, playback does not resume automatically after crossing the boundary. I now keep a variable that indicates we need to resume playback when MSE reset completes.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
priority: P1
Big impact or workaround impractical; resolve before feature release
status: archived
Archived and locked; will not be updated
type: bug
Something isn't working correctly
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With resetting MSE on boundary crossing, we might seek into a gap. This would cause MSE not to reset properly, and playback will stall. The following changes are made:
seeking
to check if we need to start the boundary timer. The timer assumes we will cross a boundary in a short period of time, and is built to handle edge cases like misalignment & subtle gaps. We first relied onseeked
but that event might never come when MSE does not reset. Thus seeking into a gap near a boundary end would have never spawned the timer in the first place, leaving the player endlessly stalling.Reproduce:
streaming.crossBoundaryStrategy
set toRESET
orRESET_TO_ENCRYPTED
.