Reputation: 993
I have a YouTube video link ...with duration 4:04
I want to play the YouTube video from 2:05 to 2:35 video only..
I googled and found to play video from certain time.
Source is: http://answers.oreilly.com/topic/1206-how-to-link-to-a-specific-point-in-a-youtube-video/
But I requirement is to play between two time intervals..
I am playing YouTube video using webview..Here is my code.
NSString *youTubeVideoPlayWebUrl1=@"http://www.youtube.com/watch?v=6zv-Uvo_Kq8";
NSString *embedHTML=[NSString stringWithFormat:@"<html><head><style type=\"text/css\">body {background-color: transparent;color: white;}</style></head><body style=\"margin:0\"><embed id=\"yt\" src=\"%@\" type=\"application/x-shockwave-flash\"width=320.0 height=200.0></embed></body></html>",youTubeVideoPlayWebUrl1];
NSLog(@"my embedhtml string is %@",embedHTML);
[WebView loadHTMLString:embedHTML baseURL:nil];
Upvotes: 1
Views: 4964
Reputation: 611
The resulting URL would be something like this: http://www.youtube.com/v/6zv-Uvo_Kq8?version=3&start=125&end=155&autoplay=1&hl=en_US&rel=0
Upvotes: 2
Reputation: 20021
To do it on an embedded video, use the “start” parameter in html of embedded video
Read this for detailed explanation
Upvotes: 0