Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Youtube Iframe disable pause video

I need to play video on my web-page. But I need to deny control. I put "controls=0", but player has pause action when I click on it. Can I disable "pause" action in YouTube player?

like image 328
Sergei Gorjunov Avatar asked Nov 17 '12 10:11

Sergei Gorjunov


People also ask

How do I turn off iframe on YouTube?

By reassigning the value of 'src' attribute of <iframe> This approach will simply replace the src attribute value if <iframe> element. When we replace the same video URL, it will start from the beginning and work as the stop functionality.

How do I unMute an iframe video?

Until and unless you have allow="autoplay;" in your iframe tag you wont be able to unmute the video. Add this attribute and further unMute function will work. Save this answer.

How do I pause an iframe video?

Click either the play or pause button, which is part of the iframe's parent page, to see it initiate play/pause of the video in the iframe player.


1 Answers

Use the following CSS on the DOM element:

.ytplayer {pointer-events: none;}
like image 121
osiris rodriguez Avatar answered Nov 18 '22 12:11

osiris rodriguez