14

我启动了一个本地 http 服务器来提供视频流:

http://localhost:55736/videos/foo.m3u8

MPMoviePlayerController用来播放它。无论是否开启飞行模式,它在 iOS6 中都能正常运行。

但在 iOS 7 中,当飞行模式打开(或同时关闭 WIFI 和蜂窝数据网络)时,我得到了错误:

_itemFailedToPlayToEnd: {
kind = 1;
new = 2;
old = 0;

}

MPMoviePlayerPlaybackDidFinishNotification处理程序中:

NSConcreteNotification 0x146c35c0 {
  name = MPMoviePlayerPlaybackDidFinishNotification; 
  object = <MPMoviePlayerController: 0x14682b90>;
  userInfo = {
    MPMoviePlayerPlaybackDidFinishReasonUserInfoKey = 1;
    error = "Error Domain=MediaPlayerErrorDomain Code=-11800....
  }
}
4

1 回答 1

18

尝试使用 127.0.0.1 而不是 localhost。它对我有用

于 2013-09-26T16:40:32.357 回答