Is there any good solution of iOS AVPlayer to let user choose specified HLS video resolution / bandwidth?
So the question will be separated in to two
- Get the resolution / bandwidth list in m3u8:
- Specify the stream resolution and bandwidth
For 1. A workaround solution is to get indicatedBitrate
of
AVPlayerItemAccessLogEvent
(Get bandwidth of stream from m3u stream)
The other possible solution is to download and parse m3u8, apart from the AVPlayer interface.
For 2. A workaround solution to change the default adaptive behavior of AVPlayer is to use preferredPeakBitRate
or preferredMaximumResolution
. But video quality might still get lower if network gets slower. (Change HLS bandwidth manually?)
Thank you.