For example, the phone is 720p, the HLS/DASH video has variants in the range 240p-1280p, and the bandwidth is good enough to play even the highest resolutions.
Will the player avoid selecting renditions above 720p? It would be a waste of bandwidth and CPU/battery to load them and then downscale to screen size.
If it does not do it out of the box, is there anything I can do to help it?
Extension: what about when the view height is just 360p (because we're not in full screen)?
The default track selector supports this. See DefaultTrackSelector.Parameters.withViewportSize and DefaultTrackSelector.Parameters.withViewportSizeFromContext.
Hi @andrewlewis, sorry if I'm too pedantic, but is this behavior enabled by default? If not, do I need to call setParameters() after every orientation change and/or view resize?
Looks like the default behavior does not filter based on viewport size (see DefaultTrackSelector.Parameters.DEFAULT).
If you set the viewport size based on the physical display size at the start of playback you won't need to update it (unless you need to support multiple displays). There is a parameter to set whether the viewport orientation may change. If you want to ensure variants at too high resolution are never picked for whatever the current viewport is then you'd need to set the parameters every time the viewport size changes.