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 consistency of FRAG_CHANGED and LEVEL_SWITCHED events #5085

Merged
merged 3 commits into from
Dec 7, 2022

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Dec 3, 2022

This PR will...

Fix consistency of FRAG_CHANGED and LEVEL_SWITCHED events after seeking back (#5077)
and update source of currentLevel getter prior to emitting these events (#5082)

Why is this PR needed:

The player uses the fragment-tracker's activeFragment.appendedPTS in getAppendedFrag to determine which fragment (and level) is currently playing. The method for updating appendedPTS only worked when playing and buffering media forward; If segments were appended ahead of the current one, appendedPTS would be assigned a value outside the segment's range. The method also used TimeRanges from alternate buffers, and appendedPTS was being set on alt audio segments even though it is never used on them.

Resolves issues:

Fixes #5077

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

…g backwards

and update currentLevel getter prior to emitting these events #5082
Fixes #5077
@robwalch robwalch added this to the 1.3.0 milestone Dec 3, 2022
@robwalch robwalch merged commit 2f79d3f into master Dec 7, 2022
@robwalch robwalch deleted the bugfix/frag-changed-level-switched-consistency branch December 7, 2022 01:56
robwalch added a commit that referenced this pull request Dec 9, 2022
robwalch added a commit that referenced this pull request Jan 9, 2023
robwalch added a commit that referenced this pull request Jan 18, 2023
robwalch added a commit that referenced this pull request Jan 26, 2023
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.

FRAG_CHANGED event not firing consistently
1 participant