IPad play Youtube link

Hej fellows,

I'm currently trying to get a YouTube link to play in my iPad app, I took the same code that works correctly on the iPhone:

-(void)playString:(NSString*)string{ NSString *youTubeVideoHTML = @"<html><head>\ <body style=\"margin:0\">\ <embed id=\"yt\" src=\"%@\" type=\"application/x-shockwave-flash\" \ width=\"%0.0f\" height=\"%0.0f\"></embed>\ </body></html>"; // Populate HTML with the URL and requested frame size NSString *html = [NSString stringWithFormat:youTubeVideoHTML, string, self.frame.size.width, self.frame.size.height]; // Load the html into the webview [self loadHTMLString:html baseURL:nil]; 

}

My view hierarchy is as follows:

 UISplitViewControler root table detail UIViewController mittels [self.view addSubview:sec.view] hinzugefügter "Popup"-Controller UIWebView auf UIButton 

Interactive recognition of youtube works very well, but when the user clicks on the inserted button inside uiwebview (which happens automatically), the video will not change to full-screen mode, but instead will play in thumbnail and no more. When the user removes the two “arrows” inside the web view manually, he will.

Any thoughts?

+4
source share
1 answer

Just a thought:

 set the "allowsInlineMediaPlayback" Property of the UIWebView to NO 
-1
source

All Articles