2010-07-02 21 views
0

我遇到MPMoviePLAYER不顯示視頻只是音頻的問題。 它不適用於iOS 4.0。MPMoviePlayer不能在iPhone 4或iOS 4.0上播放

任何人都可以幫忙嗎?

MPMoviePlayerController *moviePlayer; 
     NSBundle *bundle = [NSBundle mainBundle]; 
     NSString *moviePath = [bundle pathForResource:@"Video" ofType:@"mp4"]; 

     moviePlayer = [ [ MPMoviePlayerController alloc ] 
         initWithContentURL: [ NSURL fileURLWithPath: moviePath ] ];   
     [moviePlayer setFullscreen:YES]; 
     [moviePlayer play]; 

我也是在控制檯中得到以下信息:「非零客戶端計數AddRunningClient起動裝置」我有這個問題太

回答

1

。起初我只是在將活動配置設置爲'Distribution'時才注意到它。但是,當配置設置爲「調試」時,我開始收到消息。只有音頻播放和MPMoviePlayerController從不出現在屏幕上。

有人不夠好,做了一篇關於這個問題,並解決它的方法。似乎很多已更改的SDK更新。

http://iosdevelopertips.com/video/getting-mpmovieplayercontroller-to-cooperate-with-ios4-3-2-ipad-and-earlier-versions-of-iphone-sdk.html

我剛開始做的時候,希望你覺得它有用。

相關問題