感觉这应该在SO的某个地方。然而我找不到...
我正在尝试使用 MPMoviePlayerController,但问题是完全没有任何反应。我什至没有收到错误...
这是一些代码:
NSURL *movieUrl = [NSURL URLWithString:[attachmentDictionary objectForKey:@"Uri"]];
NSLog(@"URI %@", movieUrl);
MPMoviePlayerController *mediaController = [[MPMoviePlayerController alloc] initWithContentURL:movieUrl];
[mediaController prepareToPlay];
[mediaController.view setFrame:self.view.bounds];
[self.view addSubview:mediaController.view];
[mediaController play];
我已经包含了 MediaPlayer 框架和 MediaPlayer/MediaPlayer.h。
你知道什么可能是错的吗?
编辑:
发现我收到此错误代码:
2012-09-28 09:45:57.346 Famorable[178:907] [MPAVController] Autoplay: Disabling autoplay for pause
2012-09-28 09:45:57.348 Famorable[178:907] [MPAVController] Autoplay: Disabling autoplay
2012-09-28 09:45:57.435 Famorable[178:907] [MPAVController] Autoplay: Skipping autoplay, disabled (for current item: 1, on player: 0)