amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Allow playsinline attribute on video tag

Open koshka opened this issue 9 years ago • 6 comments

Short description of your issue:

For users that have Javascript disabled, we have a <noscript> fallback to our video element that must play inline from a UX perspective. However, the validator states: The attribute 'playsinline' may not appear in tag 'video'.

How do we reproduce the issue?

In Chrome dev tools, click Toggle Device Toolbar to mobile Go to: https://gfycat.com/BareSecondaryFlamingo#development=1

koshka avatar Dec 26 '16 20:12 koshka

/to @Gregable

jridgewell avatar Dec 27 '16 18:12 jridgewell

@jridgewell Is this applicable to amp-video as well or only video?

honeybadgerdontcare avatar Dec 27 '16 22:12 honeybadgerdontcare

We automatically add playsinline to <amp-video>, so I don't think we need to add that.

jridgewell avatar Dec 27 '16 23:12 jridgewell

hey @jridgewell <amp-video> works well for us with playsinline default The issue we have happens when JS is disabled; in that case, we have to fallback in a <noscript> section to the <video> tag. So we need the validator to not complain in the

koshka avatar Dec 28 '16 00:12 koshka

Sounds good. It appears that this attribute is fairly new, which explains why it's missing. Happy to add it.

Gregable avatar Jan 03 '17 17:01 Gregable

This is now live in prod.

honeybadgerdontcare avatar Jan 13 '17 23:01 honeybadgerdontcare