Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video block should have playsinline option #14422

Closed
t-wright opened this issue Mar 14, 2019 · 4 comments · Fixed by #14500
Closed

Video block should have playsinline option #14422

t-wright opened this issue Mar 14, 2019 · 4 comments · Fixed by #14500
Labels
[Block] Video Affects the Video Block [Type] Enhancement A suggestion for improvement.

Comments

@t-wright
Copy link

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.

@swissspidy swissspidy added [Type] Enhancement A suggestion for improvement. [Block] Video Affects the Video Block labels Mar 14, 2019
@nfmohit
Copy link
Member

nfmohit commented Mar 18, 2019

Submitted #14500 which addresses this enhancement ❤️

@t-wright
Copy link
Author

Thanks @nfmohit-wpmudev!

@planetahuevo
Copy link

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

@StefanXhunga
Copy link

Together Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Video Affects the Video Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants