我在MonoTouch中播放視頻時遇到了一些問題。從我所能找到的方面來看,有兩種不同的方法可供選擇。兩者都導致正在播放的音頻,但沒有視頻。我敢打賭我錯過了簡單的東西,所以任何幫助都會很棒。使用MonoTouch播放視頻的問題
嘗試一個 - 從MT資料爲準
moviePlayer = new MPMoviePlayerController(new NSUrl("test.mp4"));
moviePlayer.Play();
嘗試2
moviePlayer = new MPMoviePlayerViewController(new NSUrl("test.mp4"));
this.PresentMoviePlayerViewController(moviePlayer);
感謝
我曾嘗試將MPMoviePlayerController添加到視圖中,但沒有任何運氣。文檔顯示我沒有設置框架大小。添加像moviePlayer.View.Frame = View.Frame;使它變成了生命。謝謝! – 2011-01-22 17:40:29