禁用< iframe> onclick暂停 [英] Disable <iframe> onclick pause

查看:138
本文介绍了禁用< iframe> onclick暂停的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从用户中删除所有控件。我使用: controls = 0 隐藏控件, disablekb = 1 删除键盘快捷键。最后一个是鼠标点击。我做了一些研究,但没有找到所需答案。

I want to remove all controls from the user. I used: controls=0 to hide the controls and disablekb=1 to remove the keyboard shortcuts. The last left is the mouse click. I did some research, I didn't find the needed answer.

tl; dr如何删除鼠标暂停表格如下:

tl;dr How do I remove the mouse pause form an such as this:

<iframe id="ytplayer" type="text/html" width="640" height="390"
  src='http://www.youtube.com/embed/EgBWDPXF2gU?autoplay=1&disablekb=1&controls=0&origin=http://example.com' ></iframe>

编辑:有一个合法的解决方案。它不能100%工作,但对大多数情况来说都足够好了。解决方案是简单地添加一个正在寻找视频暂停事件的事件监听器。当触发此事件时,只需开始播放当前视频。这将完美无缺,除非用户点击每分钟大约150-180次点击的速度,否则视频在功能运行之前暂停时的毫秒差异将是不明显的。

There is a legal solution. It doesn't work on 100%, but it will be good enough for most cases. The solution is to simply add an event listener which is looking for the "video is paused event" When this event is triggered, simply start playing the current video. That will work flawlessly and unless the user clicks as fast as around 150-180 clicks per minute the difference for the millisecond when the video was paused before the function ran will be unnoticeable.

我会将唯一提交的答案标记为解决方案,因为如果有人发现这一点,他应该首先知道任何进一步的修改都是非法的。

I will mark the only submitted answer as the solution simply because if anyone finds this he should, at first, know that any further modifications are illegal.

推荐答案

很抱歉,但这不是法律诉讼。你可能会被youtube禁止。 https://developers.google.com/youtube/terms

Sorry to say but that is not a legal action. You could be banned for that from youtube. https://developers.google.com/youtube/terms

这篇关于禁用&lt; iframe&gt; onclick暂停的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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