在触摸设备上嵌入的YouTube视频会自动显示右键上下文菜单 [英] Embeded youtube video on touch device showing right click context menu automatically

查看:282
本文介绍了在触摸设备上嵌入的YouTube视频会自动显示右键上下文菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用cordova并使用iframe来包含youtube视频。

I'm using cordova and using iframe to include youtube video.

我使用此行将视频放在iframe中。

I am using this line to put the video in the iframe.

ylink='<iframe width="100%" height="'+height+'" src="'+ylink+'?rel=0&controls=1&showinfo=0&modestbranding=1" frameborder="0" allowfullscreen allownetworking="internal"></iframe>'

$('#list_holder').html(ylink);

ylink格式像 https://www.youtube.com/embed / XXXXXXXX

它完美加载。加载视频缩略图。然后我开始播放按钮。视频播放按预期。问题是,它也触发youtube的右键单击上下文菜单。我试图触摸视频的其他地方隐藏它,但它重现在我触摸的地方。

It loads perfectly. Video thumbnail loads. Then I start the play button. Video plays as expected. Problem is that it also trigger the right click context menu of youtube. I tried to touch other places of the video to hide it, but it reappears in the places where I touched.

然后我尝试了几个建议。最后我结束了这个巨大的URL使用所有这些建议。

Then I tried few suggestions. Last I end up with this huge url for using all those suggestions.

ylink='<iframe width="100%" height="'+height+'" src="'+ylink+'?
rel=0&controls=1&showinfo=0&modestbranding=1&disablekb=1&wmode=transparent" frameborder="0"
allowfullscreen allownetworking="internal" oncontextmenu="return false;"></iframe>'

仍然无法运作。大多数建议是使用 allownetworking =internal但我使用它,没有更改。它只发生在触摸设备上。我正在Android 2.3和4.0.4上测试

Still not working. Most suggestions were using allownetworking="internal" but I used it and no change. It's happening only on touch device. I'm testing on Android 2.3 and 4.0.4

如何停止此上下文菜单或隐藏它,禁用它?我只需要寻道控制和全屏控制。我不需要别的东西在视频。我错过了什么?

How can I stop this context menu or hide it, disable it? I only need the seek control and fullscreen control. I don't need anything else in the video. What I'm missing??

[忘记提及:有趣的是,第一行昨天工作完美,今天不工作。上下文菜单昨天未显示。 ]

[ Forgot to mention: Funny thing is that the first line worked perfectly yesterday and not working today. Context menu wasn't showing yesterday. Now I'm wondering if youtube changed anything or not.]

推荐答案

截至2014年7月11日下午3:45,此错误似乎已修复。

As of July 11, 2014 at 3:45 PM, this bug appears to have been fixed.

这篇关于在触摸设备上嵌入的YouTube视频会自动显示右键上下文菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆