Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3638

Making youtube video to autoplay

$
0
0

I need help. I have been trying this for days now. I need to integrate a Youtube video to my iPhone application (without exiting the application). The thing is that i know how to embed the video. but i need to autorun the video without showing the thumbnail.

My code shows a thumbnail view, and after i click it the video starts to play. But what i need is to play the video automatically (without displaying the thumbnail view first).

I have seen many application that has done this, but i am unable to implement it in my application.

Here's my code, can you tell me what is wrong, and how to fix it.

I have also included the parameter autoplay still its not working.

note: I have already seen apps that has this feature :)

NSString *html = @"<html><head>    <meta name = \"viewport\" content = \"initial-scale = 1.0, user-scalable = no, width = 212\"/></head>    <body style=\"background:#F00;margin-top:0px;margin-left:0px\"> <param name=\"movie\" value=\"http://www.youtube.com/embed/VO6FQ62Vip4\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"autoplay\" value=\"1\"></param><embed src=\"http://www.youtube.com/embed/VO6FQ62Vip4\" type=\"application/x-shockwave-flash\" width=\"560\" height=\"315\" allowfullscreen=\"true\" autoplay=1></embed></body></html>";        [webView loadHTMLString:html baseURL:[NSURL URLWithString:@"http://www.youtube.com/embed/VO6FQ62Vip4"]];[self.view addSubview:webView]; 

Viewing all articles
Browse latest Browse all 3638

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>