The server is not correctly configured (-12939)

时光总嘲笑我的痴心妄想 提交于 2019-12-10 22:23:26

问题


Trying to play MP3 from server without first downloading the file locally. Callback for MPMoviePlayerPlaybackDidFinishNotification comes with this:

NSConcreteNotification 0x7e1c980 {name = MPMoviePlayerPlaybackDidFinishNotification; object = <ItemMediaPlayer: 0x7856740>; userInfo = {
    MPMoviePlayerPlaybackDidFinishReasonUserInfoKey = 1;
    error = "Error Domain=MediaPlayerErrorDomain Code=-12939 \"The server is not correctly configured.\" UserInfo=0x7e243d0 {NSLocalizedDescription=The server is not correctly configured.}";

Now trying to figure out what does error code -12939 actually mean... Does MPMoviePlayerController expect that server must support byte range requests? Because this server does not (using nginx)!

To complicate things, this code fails on iOS 4.0, but works on iOS 4.1. Now thinking about dropping iOS 4.0 support, unless someone can propose a fix?


回答1:


Have a look at AudioStream, which allows you play a MP3 from a URL by streaming it.

The error could do with the fact that your server does not support "Range Requests".



来源:https://stackoverflow.com/questions/6138120/the-server-is-not-correctly-configured-12939

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!