Vidhyanand
Vidhyanand

Reputation: 993

How to play youtube video in between two time intervals in IOS

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

Answers (2)

Lithu T.V
Lithu T.V

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

Related Questions