johnyu
johnyu

Reputation: 2151

Youtube video in a UIWebView with small frame

In my app I'm supposed to make a menu where users can play a video from a list. The list is presented in a horizontal UIScrollView and I have a frame of 120x80 (in points, in pixels it's 240:160 on retina). The links for videos are either youtube urls or addresses of .m3u8 files on our server (I put them in a simple html from apple's http live streaming documentation).

My problem is with the youtube urls. These pages opened in UIWebView always have a bar on top that limits the tappable surface to half. Also when I play the video for first time another bar shows up (for like, dislike and things like that), which limits the space that will launch the video on tap to 0.

My goal here is to have the videos represented by images (UIImageViews) with buttons on top of them in shape of the "Play" triangle. When I press that UIButton, the video should show, as normal, inside an MPMovieController.

So I need 1 of 2 things:

Any tips on how to do either of these?

Upvotes: 0

Views: 797

Answers (1)

Sport
Sport

Reputation: 8983

Yes you can do like this and you need use set property on UIWebView.look this example

here

Upvotes: 1

Related Questions