sharon
sharon

Reputation: 580

Adding a YouTube video to my application

I am trying to embed a YouTube video in my application, and I am going through this tutorial as a start. I get the red screen when I run it on the stimulator, so I presume everything went well.

Now when the user taps on the screen while the video is playing I need a toolbar to appear, with a slider showing the length of the video (and the user could slide to his/her desired time on the video).

I need to know if this feature comes by default when you embed the YoutTube video, or do i have to code it? If i have to code it how should i do it? Any sample codes or tutorial?

Upvotes: 0

Views: 152

Answers (2)

dgund
dgund

Reputation: 3467

Youtube provides the HTML code for embedding videos in web pages. This HTML code will also produce a video when embedded in a UIWebView. While the video is playing, all of the standard Youtube video controls (Play, Pause, Time Slider) should also show up in the UIWebView.

Upvotes: 1

samvermette
samvermette

Reputation: 40437

The only way to show a YouTube video in an iOS app is by having it inside a UIWebView (that is what the tutorial walks you through). Once the user taps the "play" button, the video should go full screen and automatically present the standard video controls that you see when you play videos on iOS.

Upvotes: 2

Related Questions