开发者

How to play videos from a URL into an iphone app with buffering?

开发者 https://www.devze.com 2023-03-05 23:00 出处:网络
I have an iphone app which requires the videos to be played开发者_JS百科 from the URL. I dont want to download the whole videos just as it eventually slows down my app.

I have an iphone app which requires the videos to be played开发者_JS百科 from the URL.

I dont want to download the whole videos just as it eventually slows down my app.

I want to play the videos in a way that it buffers in between and then plays.

How to play videos from a URL into an iphone app with buffering?


Try Like this....

NSString *url = @"www.youtube.com/xyz";
NSString *htmlString =[NSString stringWithFormat:@"<object width='212' height='172'><param name='movie' value='%@'></param><param name='wmode' value='transparent'></param><embed src='%@'type='application/x-shockwave-flash' wmode='transparent' width='980' height='965'></embed></object>",url,url];

[myWebview loadHTMLString:htmlString baseURL:nil];


do you have own server for streaming?

then,

NSURL *url = [NSURL URLWithString: @"http://STREAMING URL"];
[myMPMoviePlayerController setContentURL: url];
[myMPMoviePlayerController play];
0

精彩评论

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