【发布时间】:2017-05-04 07:58:00
【问题描述】:
我正在开发的应用程序使用 MPMoviePlayerController 在远程 url 播放视频。当我重用播放器播放多个视频并且 url 未指向视频时,控制器不会发回任何通知。我试过 MPMoviePlayerPlaybackDidFinishNotification、MPMoviePlayerPlaybackStateDidChangeNotification 和 MPMoviePlayerLoadStateDidChangeNotification。没有一个被发送。
我还尝试执行自定义超时功能并调用播放器的停止功能,如下所示。但是,什么也没有发生。 MPMoviePlayerController 似乎死在那里,什么也不做。
[self performSelector:@selector(checkTimeout) withObject:theMovie afterDelay:15];
-(void) checkTimeout {
[self.moviePlayer stop];
}
有人知道如何用 MPMoviePlayerController 处理无效的 url 吗?
【问题讨论】:
-
显示一些额外的代码
标签: ios objective-c mpmovieplayercontroller