3
我想將mp4視頻設置爲全屏,並且它看起來很簡單,但每當我調用setFullscreen方法時,它就會變成白色的空白屏幕。有任何想法嗎?這裏是我的代碼:MPMoviePlayerViewController setFullScreen:顯示白色屏幕
- (void)tableView:(UITableView *)aTableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
......
moviePlayerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL fileURLWithPath:movpath]];
[self presentModalViewController:moviePlayerViewController animated:YES];
moviePlayerController = [moviePlayerViewController moviePlayer];
[moviePlayerController prepareToPlay];
[[moviePlayerViewController moviePlayer] play];
[[moviePlayerViewController moviePlayer] setFullscreen:YES animated:YES];
}
如果我註釋掉最後一行,視頻將發揮,但不知何故整個屏幕變成白色屏幕,而不是僅僅最大化視頻。
謝謝。
如果你在prepareToPlay之前調用'setFullscreen',會發生什麼? – 2010-12-14 21:30:43
同樣的事情發生了。我也嘗試使用moviePlayerController,他們都產生相同的結果... – okysabeni 2010-12-14 23:43:21