Skip to content

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Mar 19, 2025

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 capLevelToPlayerSize to detect the media element dimensions forces layout. The ResizeObserver avoids this speeding up player setup.

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

Might want to debounce calling this.detectPlayerSize in 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

  • 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

@robwalch robwalch force-pushed the feature/resize-observer branch from f8ad58a to 1739040 Compare July 14, 2025 22:38
@robwalch robwalch moved this from In progress to Review in progress in HLS.js Performance Aug 14, 2025
@robwalch robwalch moved this from Nice to have to Top priorities in HLS.js Release Planning and Backlog Aug 26, 2025
@robwalch robwalch force-pushed the feature/resize-observer branch from 4f8a2a8 to 1b921b8 Compare August 27, 2025 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Review in progress
Development

Successfully merging this pull request may close these issues.

1 participant