Class AVPlayer and AVPlayerStatusFailed

I use the AVPlayer class to play server URLs in our music stream. It works very well, but sometimes the status of AVPlayer is set to "AVPlayerStatusFailed". And the documentation suggests that when this happens, we need to drop the current AVPlayer object and create a new instance.

This recovery approach sometimes occurs, and when this recovery approach fails, no matter how many times the AVPlayer object is reinitialized, it does not play any songs. Has anyone encountered similar problems? and is there a solution?

+4
source share

All Articles