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

Gap controller fixes #6941

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Gap controller fixes #6941

wants to merge 1 commit into from

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Jan 4, 2025

This PR will...

  • Improve stall detection and reporting using "waiting" event timing
  • Add config.detectStallWithCurrentTimeMs with a default of 1250 to configure stall detection when currentTime does not advance while playing without a "waiting" event
  • Implement STALL_RESOLVED event - fires after "playing", "seeked", or "ended" event following BUFFER_STALLED_ERROR (Resolves Trigger an event when a stall is resolved #4273)
  • Add BufferInfo to stall-related errors (BUFFER_STALLED_ERROR, BUFFER_NUDGE_ON_STALL, BUFFER_SEEK_OVER_HOLE)
  • Add stalled.start performance timing to BUFFER_STALLED_ERROR
  • Add buffered time range array to BufferInfo
  • Only perform BUFFER_NUDGE_ON_STALL when needed (multiple buffered time ranges)
  • Fix seek on start without play() request (regression in dev)

Why is this Pull Request needed?

Stall reporting and resolution requires these enhancements. Stalls should be reported quickly and accurately. Seeking should only be performed when absolutely necessary to begin or restore playback (including flushing the rendering pipeline after passing over a gap).

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

Revisit these issues to see if they can be addressed with additional changes:

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

- Improve stall detection and reporting using "waiting" event timing
- Add `config.detectStallWithCurrentTimeMs` with a default of 1250 to configure stall detection when currentTime does not advance while playing without a "waiting" event
- Implement STALL_RESOLVED event - fires after "playing", "seeked", or "ended" event following BUFFER_STALLED_ERROR (Resolves #4273)
- Add BufferInfo to stall-related errors (BUFFER_STALLED_ERROR, BUFFER_NUDGE_ON_STALL, BUFFER_SEEK_OVER_HOLE)
- Add `stalled.start` performance timing to BUFFER_STALLED_ERROR
- Add `buffered` time range array to BufferInfo
- Only perform BUFFER_NUDGE_ON_STALL when needed (multiple buffered time ranges)
- Fix seek on start without play() request (regression in dev)
@robwalch robwalch added this to the 1.6.0 milestone Jan 4, 2025
@robwalch robwalch requested a review from iamboorrito January 4, 2025 02:13
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.

Trigger an event when a stall is resolved
1 participant