使用Monotouch在iPhone中播放MJPEG流

时间:2013-02-27 11:29:55

标签: iphone xamarin.ios mjpeg

如何使用Monotouch在iPhone中播放MJPEG流?

首先我使用webview进行游戏。在iOS 5中,它正在播放,但在iOS 6及更高版本中,MJPEG不能在webview中播放。

我在XCode中找到了Motion JPEG图像视图。

https://github.com/mateagar/Motion-JPEG-Image-View-for-iOS

我尝试将Motion JPEG图像视图转换为Monotouch c#,但我不能。

2 个答案:

答案 0 :(得分:1)

您是否尝试过使用MPMoviePlayerViewController? Apple doc here

我们使用它来播放this app中的本地视频文件,效果很好。

像这样使用它,确保它是“ViewController”而不是“Controller”:

var movieController = new MPMoviePlayerController(new NSUrl("http://yoururl.com/yourmovie.mp4"));
movieController.MoviePlayer.ShouldAutoplay = true;
movieController.MoviePlayer.SourceType = MPMovieSourceType.Streaming;
//Show the controller modally over top another controller
PresentViewController(movieController, true, null);

答案 1 :(得分:0)

使用MJPEGClient可以播放带插槽的MJPEG视频。我已经实施了以下示例MJPEG 如果有任何问题请回复我。