I'm having grid of videos, AVPlayer sometimes fail to play video and showing this disabled icon with following error,
Domain=AVFoundationErrorDomain Code=-11850 "Operation Stopped" UserInfo={NSUnderlyingError=0x7f927ede4210
{Error Domain=NSOSStatusErrorDomain Code=-12939 "(null)"}
, NSLocalizedFailureReason=The server is not correctly configured., NSLocalizedDescription=Operation Stopped})
but same video getting played later on, so it is random issue. Any help on what's going wrong?
I believe there are a lot of people, like me, are looking for the solution of this problem.
I spent a whole afternoon's time, finally solved the problem.
On the question, an error occurred when the video starts playing.
such as:
Domain=AVFoundationErrorDomain Code=-11850 "Operation Stopped"
then I search this error number, and find it:
AVErrorServerIncorrectlyConfigured = -11850
In Apple's Document, I find some information about this error.
The HTTP server sending the media resource is not configured as expected. This might mean that the server does not support byte range requests.
So, we should understand that this is a server problem.
Now, we play a video, and grab all http request for analysis.
Will find that AVPlayerItem sends an HTTP request.
when AVPlayerItem receive a video URL , it do the following task:
In my situation , when send range[0-1] HTTP request, the server side give me a 200 OK response, So error occurred.
So, you need to ask your server engineer to detect all response who return.
I wish it could help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With