开发者

How to load video from remote server in iphone?

开发者 https://www.devze.com 2022-12-13 08:08 出处:网络
I want to play a video from a remote server and not from youtube. The 开发者_开发问答video should start streaming in the in built video player of the iphone.

I want to play a video from a remote server and not from youtube. The 开发者_开发问答video should start streaming in the in built video player of the iphone.

Can anyone help me with this.....

Thanx in advance


I use UIWebView to play my apps tutorial movies. Just make sure you're providing an iPhone-compatible movie format.

NSUrl *url = @"http://streamXXX.com/mymovie.m4v";
[yourWebview loadRequest:[NSURLRequest requestWithURL:url]];

And FWIW, I was going to embed the videos in my bundle, but it quickly grew beyond the 10MB app store download limit (when not connected with wifi) so after fighting with hosting them at youtube, blip.tv came to the rescue. My vids weren't reformatted dimensionally @blip.


You can use the Media Player Framework, there is an example here http://developer.apple.com/iphone/library/samplecode/MoviePlayer_iPhone/index.html

0

精彩评论

暂无评论...
验证码 换一张
取 消