How do videos autoplay on iOS at youtube.com

vsky picture vsky · Jun 21, 2013 · Viewed 27k times · Source

When I set autoplay to true for a YouTube video (IFrame API) on my site, it doesn't work. All the documentation says apple disables autoplay on ios for bandwidth reasons.

However, I see that videos play automatically (without clicking on the video element) on youtube.com on iPad. How did YouTube make it work? It would be hard to imagine Apple does something special just for YouTube.

Answer

Aitor Aznar Álvarez picture Aitor Aznar Álvarez · Apr 20, 2015

It seems that Youtube's team uses the interaction of the user when taps/clicks a video button to authorize the reproduction.

Remember that youtube.com is a SPA (Single Page Application) so there is no page reload or redirection.

So, youtube.com doesn't have autoplay enabled.