2012-03-31 65 views
0

QuickTime播放器出現在我的View Controller層上,因爲它應該和視頻文件「Happy」完全播放,但沒有播放視頻。只聽到音頻。完成之後,QuickTime播放器會按照它應該轉換回前一個View Controller。MPMoviePlayerViewController - 聽到聲音,但沒有看到視頻

NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"Happy" ofType:@"m4v"]]; 
MPMoviePlayerViewController * playerController = [[MPMoviePlayerViewController alloc] initWithContentURL:url];    
[self presentMoviePlayerViewControllerAnimated:playerController]; 
playerController.moviePlayer.movieSourceType = MPMovieSourceTypeFile; 
playerController.moviePlayer.controlStyle = MPMovieControlStyleNone; 
[playerController.moviePlayer play]; 
[playerController release]; 
playerController=nil; 

回答

0

據我所知,我們不能玩M4V files.Convert它MP4

+0

啊...... iPhone 4.3模擬器用來支持視頻格式。我甚至嘗試過.mov,它不起作用。我只是能夠獲得.m4v文件類型以成功播放(音頻和視頻)。 – yellahd 2012-03-31 14:31:48

+0

...更新我的模擬器版本的時間。感謝您的回答 – yellahd 2012-03-31 14:48:26

相關問題