Gutenberg: Video block should have playsinline option

Created on 14 Mar 2019  路  4Comments  路  Source: WordPress/gutenberg

Is your feature request related to a problem? Please describe.
The core/video block has an 'autoplay' option along with options to hide controls, mute and loop the video. These settings would make this block useful to display gifs in a more efficient video format, for instance. However for autoplay to work on mobile devices the playsinline attribute is also required on the <video> element. Currently if you enable autoplay and hide controls, the video is not playable on mobile devices.

Describe the solution you'd like
Would be great to have a 'playsinline' option on this block or perhaps add the attribute to the markup automatically if controls are hidden and autoplay is selected.

Describe alternatives you've considered
For the time being I'm adding this with attribute through a the_content filter but would be better if it was controllable through the editor.

[Block] Video [Type] Enhancement

Most helpful comment

Submitted #14500 which addresses this enhancement 鉂わ笍

All 4 comments

Submitted #14500 which addresses this enhancement 鉂わ笍

Thanks @nfmohit-wpmudev!

Is this working on the cover background video? has this been deployed into core?
Thanks!

Together Thank you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maddisondesigns picture maddisondesigns  路  3Comments

davidsword picture davidsword  路  3Comments

youknowriad picture youknowriad  路  3Comments

hedgefield picture hedgefield  路  3Comments

moorscode picture moorscode  路  3Comments