4
votes

Hej fellows,

I'm currently trying to get an youtube-link to play inside my app on iPad, I took the same code which works properly on 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 looks like follows:

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

The interactive youtube-recognition works quite well, but when the user taps on the inserted button inside the uiwebview (which takes places automatically), the video won't change to fullscreen but instead plays in the tiny thumbnail and not more. When the user taps the two "arrows" inside the webview manually it will.

Any thoughts?

1

1 Answers

-1
votes

Just a thought:

set the "allowsInlineMediaPlayback" Property of the UIWebView to NO