使用moviePlayerController从URL中播放大文件时出错

时间:2012-06-11 18:23:51

标签: iphone ios mpmovieplayercontroller

我正在尝试从我的服务器播放一个大文件(大约500 MB)。该视频将作为流媒体视频播放。但是我收到了以下错误:

2012-06-11 23:40:28.073 defenceCourses [18184:11f03] 由于未捕获的异常'NSInvalidArgumentException'而终止应用,原因:' AVPlayerItem无法与多个AVPlayer实例关联 首先抛出调用堆栈: (0x113022 0x1607cd6 0x29fadb3 0x29f024e 0x29f1194 0x188d330 0x188f509 0x4a803 0x49d84 0x49c9b 0x1b6d7d8 0x1b6d88a 0x4ee626 0x27c2 0x2735 0x1) 终止称为抛出异常

以下是我的代码:

NSURL *fileURL = [NSURL URLWithString:@"http://www.defencecourse.com/digital-reproductions/yellow-belt.mp4"];
moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:fileURL]; 
[moviePlayerController prepareToPlay];
[moviePlayerController.view setFrame:CGRectMake(0, 70, 320, 270)]; 
[self.view addSubview:moviePlayerController.view];  
moviePlayerController.fullscreen = YES;  
[moviePlayerController play];

有人可以帮帮我吗?

问候
的Pankaj

0 个答案:

没有答案