RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
237 stars 29 forks source link

What is the best way to switch resolutions during playback of an M3U8 HLS stream on Android ExoPlayer #2004

Closed rossstyants closed 2 months ago

rossstyants commented 2 months ago

We need to switch playback resolutions on the Exo Player based on user's choices - Low, Medium, High, Auto

Unity 2022.3.16 AVPro 2.7.3 Android - Exo Player

So - my question is just what is the best way to switch resolutions when the user hits one of those buttons. We used to parse the HLS stream ourselves and then present the user with options and directly stream the variant based on what they chose - but that code is old and out of date and we're wondering if there's a simpler easier solution like just using the media player prefs - as per this issue https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/970

Chris-RH commented 2 months ago

Hi, Its not something that we have implemented yet (the issue would be closed if we had). So you would need to continue doing it the way that you are.

Ste-RH commented 2 months ago

@rossstyants We have put a fix in for #970 in v3.x. Not sure if it will help your use case, but you can now change the maximum resolution/bitrate that an adaptive stream will playback at, on Android, on the fly.

We are looking into adding playback selection of specific variants within an adaptive stream. This will likely be Android only initially, and we will look to add support for other viable platforms going forward. We currently have no timeframe for this addition going live.