Use ResizeObserver to cap level to player size - #7108
Merged
Conversation
robwalch
commented
Jul 11, 2025
robwalch
force-pushed
the
feature/resize-observer
branch
from
July 14, 2025 22:38
f8ad58a to
1739040
Compare
robwalch
force-pushed
the
feature/resize-observer
branch
from
August 27, 2025 15:03
4f8a2a8 to
1b921b8
Compare
3 tasks
5 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR will...
Use ResizeObserver when available in cap-level-controller.
Improve buffer removal boundary used in fast switch-up to reduce stalling, for in live playback.
Why is this Pull Request needed?
Using
capLevelToPlayerSizeto detect the media element dimensions forces layout. TheResizeObserveravoids this speeding up player setup.Are there any points in the code the reviewer needs to double check?
Might want to debounce calling
this.detectPlayerSizein the observer callback to avoid setting the level more than once when the media element size is animated by the browser during transitions like entering and exiting fullscreen.Resolves issues:
Checklist