iPad + HTML5 视频标签 +外接显示器问题
我在 iPad 上的 UIWebview 中使用 HTML5 视频标签,并使用 CSS 根据需要定位它们。这些视频的关键部分是它们被设计为占据页面上的部分可见区域,但不是全部。当我在仅向主 UIScreen 显示内容的“正常”模式下执行此操作时,一切都很好。
然而,当外部 VGA 投影仪连接为第二个 UIScreen 时,视频标签内容立即变为全屏。在 Safari 中观看 YouTube 视频等时,似乎也会发生这种情况。在搜索文档时,似乎没有办法阻止/控制这种行为。
连接第二个显示器时,有什么方法可以阻止视频标签强制其内容进入全屏?
I am using HTML5 video tags in a UIWebview on the iPad, and positioning them as needed using CSS. The key part of these videos is that they are designed to take up part, but not all, of the visible area on the page. When I'm doing this in the "normal" mode of displaying content only to the primary UIScreen, everything works great.
However, when an external VGA projector is hooked up as a second UIScreen, the video tag content immediately becomes FULL SCREEN. This seems to also happen in Safari when looking at, for example, YouTube videos. In searching the docs, there seems to be no way to stop / control this behavior.
Is there any way to stop a video tag from forcing its content to go to full screen when a second display is connected?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,使用 UIWebView iOS 3.2 没有提供任何方法来做到这一点。 UIWebView 中的视频始终使用电视输出功能在外部显示器上全屏播放。
不过,好消息是 iOS 4 确实提供了解决方案。 UIWebView 有几个新属性:
allowedInlineMediaPlayback
http://developer.apple.com/library/ios/documentation/uikit/reference/UIWebView_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006950-CH3-SW32
mediaPlaybackRequiresUserAction
http://developer.apple.com/library/ios/documentation/uikit/reference/UIWebView_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006950-CH3-SW33
前者将允许视频保持“内联”,而不是使用全屏播放器。
Unfortunately, using a UIWebView iOS 3.2 doesn't offer any way to do this. Video in a UIWebView always plays fullscreen on an external display using the TV out feature.
However, the good news is that iOS 4 does offer a solution. UIWebView has a couple of new properties:
allowsInlineMediaPlayback
http://developer.apple.com/library/ios/documentation/uikit/reference/UIWebView_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006950-CH3-SW32
mediaPlaybackRequiresUserAction
http://developer.apple.com/library/ios/documentation/uikit/reference/UIWebView_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006950-CH3-SW33
The former will allow the videos to remain 'inline' as opposed to using the full-screen player.