服务器配置不正确(-12939) [英] The server is not correctly configured (-12939)

查看:161
本文介绍了服务器配置不正确(-12939)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试从服务器播放MP3,而无需先在本地下载文件.随此附带的MPMoviePlayerPlaybackDidFinishNotification回调:

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.}";

现在尝试找出错误代码-12939的实际含义 ...... MPMoviePlayerController是否期望服务器必须支持字节范围请求?因为该服务器没有(使用nginx)!

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)!

复杂的是,此代码在iOS 4.0上失败,但在iOS 4.1上有效.现在正在考虑放弃iOS 4.0支持,除非有人可以提出修复建议?

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?

推荐答案

看看 AudioStream ,这样您就可以通过流式传输从URL播放MP3.

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".

这篇关于服务器配置不正确(-12939)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆