I have an AVPlayer
that is loading a remote media URL
(HLS
stream) and sometimes the player is never ready to play, but no error is presented. Is there somewhere else an error can be or a way to check if it is still loading the AVPlayerItem
?
I have KVO
for rate, status, and playback likely to keep up which never get called when the video isn't loading. I added a button to check for an error on the player, the player item, and whether playback is likely to keep up. These report nil, nil, and false when the player seems stuck. It seems random when the player gets stuck(refuses to load vidoe at all), it doesn't happen on a specific video.
What other steps can I take to debug this issue? Are there other places to check for errors or status?
More info checked: Playback buffer is empty: true Playback buffer is full: false