Phonegap 和带有嵌入式 YouTube 视频的 iPhone,转换滚动问题
我正在将 YouTube 视频嵌入到我的 iPhone PhoneGap 应用程序中,
例如,
<embed id="yt" src="http://www.youtube.com/v/myvidid" width="300" height="199"></embed>
这一切都工作正常,因为 iPhone 会将这些视频识别为 YouTube 视频,并将插入海报图像,并在单击时调用 YouTube 应用程序。然而问题是这些 YouTube 嵌入内容位于可滚动内容区域内,为此我使用 CSS 转换通过触摸滚动来上下移动。当用户滚动该区域时,视频在我的内容顶部的固定位置保持静态。无论我向嵌入添加什么 CSS,似乎都没有改变这种行为。
有没有人以前遇到过这种行为或找到解决办法。
非常感谢。
安德鲁
I'm embedding youtube videos within my iPhone phonegap app
e.g
<embed id="yt" src="http://www.youtube.com/v/myvidid" width="300" height="199"></embed>
This all works fine as the iPhone recognises these as a youtube videos and will insert the poster image and also invoke the youtube app upon click. However the problem is these youtube embeds are within a scrollable content area, for which I use CSS transformations to move up and down via touch scroll. When the user scrolls the area the video stays static in a fixed position on top of my content. No matter what CSS I add to the embeds, nothing seems to change this behavior.
Has anyone come across this behavior before or found a fix.
Many thanks.
Andrew
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我有同样的问题,必须使用以下解决方法:
使用如下代码:
付费按钮
loadVideo 函数模型的 CSS 代码:
I have the same issue and had to use following workaround:
With code like this:
CSS code for pay button
loadVideo function mockup:
这是一个很好的教程,拯救了我的一天
http://eisabainyo.net/weblog/2012/01/24/embed-a-youtube-video-iframe-in-phonegap-app/
我还发布了一些代码以便快速访问。
然后在 Phonegap.plist 中进行以下更改,
视频也将在您的模拟器上播放。
Here is a nice tutorial Which Saved my Day
http://eisabainyo.net/weblog/2012/01/24/embed-a-youtube-video-iframe-in-phonegap-app/
Also i m posting some codes For a quick Access.
Then make the following changes in Phonegap.plist
Video will play on your Simulator Also.