Description
Have you read the FAQ and checked for duplicate open issues?
This was discussed as a part of #565, but the limit based on video container size wasn't implemented.
Is your feature request related to a problem? Please describe.
A functionality that Dash.js and hls.js have is the ability to limit which quality levels are selected based on video element size.
Describe the solution you'd like
On the ABR settings, an extra flag could be added to instruct the ABR manager to limit the quality level based on the video element. For example:
{
abr: {
capLevelToPlayerSize: true
}
}
Or:
{
abr: {
limitBitrateByPortal: true
}
}
Those are the options used in Dash.js and hls.js. You can choose any name fits for this project.
Describe alternatives you've considered
Without this feature, a possible solution would be to introduce a ResizeObserver
on the video element to react to changes in size and dynamically set the ABR restrictions on Shaka player.
Additional context
This would allow saving time (and potential problems with the orchestration of the ResizeObserver
and the dynamic setting of restrictions) that can arise in the implementation of a video player that handles bandwidth in a smart way not to load a video quality that is higher than required at a given moment.