Access Yuutube Url MPMoviePlayerController without video file name
i m access Youtube url -: http://www.youtube.com/v/9Na-LXU5m3g?f=videos&app=youtube_gdata but MpMoviePlayerController dont show the video .
movieURL=[NSURL URLWithString:@"http开发者_高级运维://www.youtube.com/v/9Na-LXU5m3g?f=videos&app=youtube_gdata"];
mpMoviePlayerController=[[MPMoviePlayerController alloc] initWithContentURL:movieURL];
[[NSNotificationCenter defaultCenter]
addObserver: self
selector: @selector(myMovieFinishedCallback:)
name: MPMoviePlayerPlaybackDidFinishNotification
object: mpMoviePlayerController];
[mpMoviePlayerController play];
Thanks in Advance.
For you tube videos,display the url in webview.It will automatically play the video in the movie player on tapping the video in the webview.
All the best.
精彩评论