【发布时间】:2018-01-23 13:10:16
【问题描述】:
我正在使用代码:视频没有播放
moviePlayer = new MPMoviePlayerController(new NSUrl("http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4"));
//set appearance of video player
moviePlayer.View.Frame = new RectangleF(10, 80, 300, 200);
moviePlayer.View.BackgroundColor = UIColor.Clear;
moviePlayer.SourceType = MPMovieSourceType.File;
// Set this property True if you want the video to be auto played on page load
moviePlayer.ShouldAutoplay = true;
// If you want to keep the Video player on-ready-to-play state, then enable this
// This will keep the video content loaded from the URL, untill you play it.
moviePlayer.PrepareToPlay();
// Enable the embeded video controls of the Video Player, this has several types of Embedded controls for you to choose
moviePlayer.ControlStyle = MPMovieControlStyle.Default;
View.AddSubview(moviePlayer.View);
moviePlayer 将在此 URL 播放此视频:
http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8
但不是这个:
http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4
【问题讨论】:
标签: xamarin xamarin.ios