charliehorse55
charliehorse55

Reputation: 1990

Play embeded youtube video on button press

Is it possible to embed a youtube video in your application, but rather than showing the user a preview thumbnail that can be touched, show a standard UIButton that loads the video directly into the actual youtube player when touched. After the user clicks done control would return to my application (as it does with embedded webview) Is this possible?

Upvotes: 1

Views: 1187

Answers (1)

msk
msk

Reputation: 8905

Use youtube custom URL scheme. Read it from here

E.g.

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.youtube.com/watch?v=VIDEO_IDENTIFIER"]];

This approach will take you out of your app and open native Youtube app. I don't think there is any thing available in youtube player options to hide thumbnail. For autoplay without tapping UIWebView please read answers for this this and this

Upvotes: 2

Related Questions