嘿,伙计们,
我目前正在尝试在我的iPad应用程序中播放一个youtube链接,我使用了在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];}
我的视图层次结构如下所示:
UISplitViewControler
root
table
detail
UIViewController
mittels [self.view addSubview:sec.view] hinzugefügter "Popup"-Controller
UIWebView auf UIButton交互式youtube识别效果很好,但当用户在uiwebview (自动发生)中点击插入的按钮时,视频不会变成全屏,而是在小缩略图中播放,而不是更多。当用户手动点击webview中的两个“箭头”时,它将会。
有什么想法吗?
发布于 2011-07-29 17:55:57
这只是一个想法:
set the "allowsInlineMediaPlayback" Property of the UIWebView to NOhttps://stackoverflow.com/questions/6845803
复制相似问题