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 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>
EDIT: 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.
Try this trick for iframe or iframe wrapper:
#ytplayer {pointer-events: none;}
Sorry to say but that is not a legal action. You could be banned for that from youtube. https://developers.google.com/youtube/terms
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With