电影播放器的激活状态错误(1) [英] Movie player has wrong activation state (1)
本文介绍了电影播放器的激活状态错误(1)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨!我正在从视频URL捕获视频的缩略图.而且我正在使用以下代码来捕获缩略图
Hi! I am capturing the thumbnail image of video from video url. And I am using following code to capture the thumbnail
MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc]initWithContentURL:movieURL];
[moviePlayer setControlStyle:MPMovieControlStyleFullscreen];
[moviePlayer setFullscreen:YES];
moviePlayer.useApplicationAudioSession = NO;
UIImage *image = [moviePlayer thumbnailImageAtTime:(NSTimeInterval)1.0 timeOption: MPMovieTimeOptionNearestKeyFrame];
我正在为此使用线程.我收到以下错误:
I am using threading for this. I am getting the following error:
电影播放器的激活状态(1)错误
Movie player has wrong activation state (1)
有人可以帮助我吗?
推荐答案
init
正在播放电影播放器时,您已经拥有一个.只能有一个MPMoviePlayerController.您可能正在循环执行此操作.您需要将最后一个设置为nil
或一遍又一遍地重复使用.
When you are init
ing the movie player, you already have one. There can be only one MPMoviePlayerController. You are probably doing this in a loop. You need to set your last one to nil
or keep reusing the same one over and over.
这篇关于电影播放器的激活状态错误(1)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文