Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Youtube iframe API - Android fullscreen

I'm using the YouTube iframe api to embed a video. When playing the video on an iPhone, the video automatically switches to full screen mode. I was wondering if it's possible to force the same behavior on an Android? (currently the video is played inline, which doesn't look so good).

like image 911
Guy Nesher Avatar asked Nov 03 '22 01:11

Guy Nesher


1 Answers

There is no way to automatically play the video fullscreen. The closest you could get is to put the player in a fullscreen div and autoplay it using the url params:

<iframe width="100%" height="100%" src="//www.youtube.com/embed/fSy6uh-GjCc?controls=0&amp;autoplay=1&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>
like image 160
Kim T Avatar answered Nov 12 '22 21:11

Kim T