Hello, I am developing a custom player SDK using AVPlayer to support HLS and LL-HLS live streaming. I have some questions about the internal logic of AVPlayer regarding ABR, as this information is not explicitly covered in the documentation.
-
ABR Switching Logic: Does AVPlayer trigger bitrate switching primarily based on stall occurrences (buffer starvation)? I am curious if the switching logic is reactive to stalls or if it proactively switches to prevent them based on throughput estimation.
-
Developer Controls for ABR: To influence or control the ABR selection, are preferredPeakBitRate and preferredForwardBufferDuration the only properties available to developers? Are there any other recommended APIs to assist with ABR decisions?
Thank you for your help.
To your first question, AVPlayer ABR logic is constantly evolving, so it is not published or documented. If you are running into a case where it is not performing as well as you think it should be, please file a bug with logs and sample content and we will try to look into what's going on.
Regarding API, AVPlayerItem also offers preferredMaximumResolution, and for LL specifically, configuredTimeOffsetFromLive, recommendedTimeOffsetFromLive and automaticallyPreservesTimeOffsetFromLive also influence ABR behavior.