"webkit-playsinline" video tag attribute

tim peterson picture tim peterson · Jun 13, 2013 · Viewed 74.7k times · Source

The <video> tag attribute webkit-playsinline supposedly prevents the default go to fullscreen behavior of HTML5 videos.

I added this attribute to my video tag and checked mobile safari and chrome on iOS6 iPhone and it doesn't work. The video still goes fullscreen. This is similar to others' experiences as described on SO two years ago.

What mobile browsers as of today, June 13th, 2013 does this attribute webkit-playsinline work?

Answer

fregante picture fregante · Jun 22, 2016

Apple has finally enabled the playsinline attribute on iOS 10, so this will work:

<video src="file.mp4" playsinline>

I wrote a polyfill called iphone-inline-video that adds the same behavior to iOS 8 and 9.