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];
精彩评论