2
我使用下面的代碼來播放url的視頻,但是當視頻加載時只播放音頻並且沒有視頻顯示在模擬器上..現在我無法在iphone 4.0設備上測試它...有沒有與模擬器的問題或者是MPMoviePlayerViewController是不是正確的方法?MPMoviePlayerViewController只在模擬器上播放音頻沒有視頻?
NSString *videoFilepath = @"http://www.migital.com/Hemant/1.3gp";
NSURL *videoURL = [NSURL URLWithString:videoFilepath ];
MPMoviePlayerViewController *movie = [[MPMoviePlayerViewController alloc] initWithContentURL:videoURL];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(playbackFinishedCallback:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:movie];
[self presentMoviePlayerViewControllerAnimated:movie];