1
感覺這個應該在SO的某個地方。但我找不到它...MPMoviePlayerController不會玩
我想要使用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)