我启动了一个本地 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....
}
}
最佳答案
尝试使用 127.0.0.1 而不是本地主机。它对我有用
关于ios - 飞行模式打开时无法在 iOS 7 中播放本地视频流,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19007518/