MPMovieFinishReasonPlaybackError 读取错误日志 - Objective-C
我正在使用 MPMoviePlayerController 来播放视频文件。有些电影没有播放。我刚刚收到 MPMovieFinishReasonPlaybackError。但由于某些原因我无法读取错误日志。 这是代码:
case MPMovieFinishReasonPlaybackError:
{
NSLog(@"%@",moviePlayer.errorLog);
}
break;
错误日志为空。如何读取错误日志?
I'm using MPMoviePlayerController to play video files. Some movies are not playing. I just recieve MPMovieFinishReasonPlaybackError. But for some reasons I can't read error log.
Here is code:
case MPMovieFinishReasonPlaybackError:
{
NSLog(@"%@",moviePlayer.errorLog);
}
break;
Error log is null. How to read Error log?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您确定正确访问 NSError 对象吗?
如果发生错误,通知将包含一个 NSError 对象,可使用通知的 userInfo 字典中的 @"error" 键来使用。
http://developer.apple.com/库/ios/#documentation/mediaplayer/reference/MPMoviePlayerController_Class/Reference/Reference.html
Are you sure you are accessing the NSError object correctly?
In case of an error, the notification contains an NSError object available using the @"error" key in the notification's userInfo dictionary.
http://developer.apple.com/library/ios/#documentation/mediaplayer/reference/MPMoviePlayerController_Class/Reference/Reference.html