Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The Play button on a youtube embed does not work on android-chrome

I've been working on an embedded youtube video on a page. Works fine on desktop browsers. However, on android-chrome, the embedded video won't play when you touch on the red play button on the center. It does play fine when you touch just outside the play button, which is weird.

My client also reports the same thing on ipad's browser.

Weird, because the red play button does not work even on this demo from google: https://developers.google.com/youtube/youtube_player_demo

I tested it on my android phone (HTC one), and on the desktop google chrome's mobile emulation feature.

Does anyone know any way to fix this? Thanks.

like image 455
Bibokid Avatar asked Jan 09 '23 16:01

Bibokid


1 Answers

there is another solution if you want to enable controls you should use ps=docs like this :

<iframe class="youtube-player" type="text/html" width="100%" height="338" src="http://www.youtube.com/embed/VIDEO-ID?ps=docs&controls=1" frameborder="0" allowfullscreen></iframe>

i have tested it ... it works!!

i hope this will help.

like image 178
mortb Avatar answered Mar 01 '23 10:03

mortb