1

I used below function for play youtube videos in iPhone using UIWebView

      - (void)embedYouTube {

       videoHTML = [NSString stringWithFormat:@"\
             <html>\
             <head>\
             <style type=\"text/css\">\
             iframe {position:absolute; top:50%%; margin-top:-130px;}\
             body {background-color:#000; margin:0;}\
             </style>\
             </head>\
             <body>\
             <iframe width=\"560\" height=\"315\" src=\"http://www.youtube.com/embed/xxxxxxxxxxxxx\" frameborder=\"0\" allowfullscreen></iframe>\
             </body>\
             </html>"];

        [videoView loadHTMLString:videoHTML baseURL:nil];
    }

By this method video will play in the iOS media player. I wanted to hide controllers automatically, when the video is playing. Problem is how to access the media player instance.

Susitha
  • 3,339
  • 5
  • 27
  • 41

1 Answers1

2

I think you can try Subview concept, to access MoviePlayercontroller. Please refer this article here.

Paramasivan Samuttiram
  • 3,728
  • 1
  • 24
  • 28