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

Event for maxAutoLevel change #4521

Closed
littlespex opened this issue Jan 21, 2022 · 2 comments · Fixed by #5763
Closed

Event for maxAutoLevel change #4521

littlespex opened this issue Jan 21, 2022 · 2 comments · Fixed by #5763

Comments

@littlespex
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

When capLevelToPlayerSize is enabled maxAutoLevel is dynamically set based on the player's dimensions. There is currently no way to know when the values changes besides polling for changes to player.maxAutoLevel. Knowing when the value changes is useful information when drawing a bitrate/level/quality selection menu.

Describe the solution you'd like

Fire an event when maxAutoLevel changes.

Additional context

The LEVELS_UPDATED event could be used for this use case, or a new event entirely.

@littlespex littlespex added Feature proposal Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Jan 21, 2022
@robwalch
Copy link
Collaborator

robwalch commented Jul 15, 2022

Not a Contribution

The LEVELS_UPDATED event could be used for this use case, or a new event entirely.

This would require a new event, as LEVELS_UPDATED should only fire when hls.levels changes (which only happens when removeLevel is called in level-controller).

There is a FPS_DROP_LEVEL_CAPPING event so following that convention a PLAYER_SIZE_LEVEL_CAPPING event would make sense, and would also trigger right before setting hls.autoLevelCapping and calling streamController.nextLevelSwitch() (although thinking about it events should fire after these changes, not before, but that's another issue).

@robwalch robwalch removed the Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. label Jul 15, 2022
littlespex pushed a commit to cbsinteractive/hls.js that referenced this issue Dec 9, 2022
@robwalch robwalch added this to the 1.5.0 milestone Feb 9, 2023
@robwalch
Copy link
Collaborator

There is also a minAutoLevel so whatever event we come up should probably include the range. When these values change because of LEVELS_UPDATED the event should follow the LEVELS_UPDATED event OR the new event should include the updated levels array (since it could fire while LEVELS_UPDATED is still being dispatched).

robwalch added a commit that referenced this issue Aug 23, 2023
@robwalch robwalch added the Verify Fixed An unreleased bug fix has been merged and should be verified before closing. label Aug 28, 2023
@robwalch robwalch removed the Verify Fixed An unreleased bug fix has been merged and should be verified before closing. label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

2 participants