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 incorrect audio track segments loaded before video segment with > 0 startPosition #3951

Merged
merged 1 commit into from May 27, 2021

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented May 26, 2021

This PR will...

Use startPosition to determine if audio-stream-controller waiting fragment should be cleared.

Why is this Pull Request needed?

While waiting for init PTS from the stream-controller's first video segment, the audio-stream-controller will prefetch a segment, and then on tick, check if that waitingFragment is correct for the current loading context. If not it is cleared so that it can prefetch a better match.

The logic for this used the initial video.currentTime of 0 which doesn't match startPosition. The player only seeks after media has been buffered to avoid multiple seeks or stalls so it's important that this check use this.getLoadPosition() instead. That way startPosition is honored until media is buffered and video.currentTime has been adjusted to start playback at the start position.

Resolves issues:

Fixes #3950

Checklist

  • changes have been done against master branch, and PR does not conflict

@robwalch robwalch added this to the 1.0.5 milestone May 26, 2021
@robwalch robwalch added this to Top priorities in Release Planning and Backlog via automation May 26, 2021
@robwalch
Copy link
Collaborator Author

robwalch commented May 26, 2021

Demo page test link for 1192057 (add "startPosition": 531 to the config and throttle bandwidth and CPU helps delay delivery of the first video segment which was instrumental in reproducing the issue)

@robwalch robwalch merged commit 4b4f4a1 into master May 27, 2021
@robwalch robwalch deleted the bugfix/audio-stream-start-position branch May 27, 2021 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Release Planning and Backlog
  
Top priorities
Development

Successfully merging this pull request may close these issues.

Enormous playback delay on low bandwidth connection(5Mb/s throttling) when start position is specified
1 participant