use / try below code that works, i was hoping.
NSString *embedHTML = @"\ <html><head>\ <style type=\"text/css\">\ body {\ background-color: transparent; color: white; }\ </style>\ </head><body style=\"margin:0\">\ <embed id=\"yt\" src=\"%@\" type=\"application/x-shockwave-flash\" \ width=\"%0.0f\" height=\"%0.0f\"></embed>\ </body></html>"; NSString *htmlString = [NSString stringWithFormat:embedHTML, yourURLString, width,height];//set width and height [webView loadHTMLString:htmlStr baseURL:nil]; [self.view addSubview:webView];
or
use the second approach using the delegate method of the UIWebView class
allowInlineMediaPlayback
source share