Repository navigation
Video: Enable autoplay for video on iOS devices - #69380
Conversation
274fcbb to
a93f764
Compare
a93f764 to
a62c853
Compare
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
@im3dabasia have you ever merged the approved PR yourself? I think you're already a member of the Gutenberg repo, so if you haven't already, give it a go 👍 When merging any PR, don't forget to add the props list. It would also be good to align the commit message with the PR title if there is a difference between them.
|
Co-authored-by: im3dabasia <im3dabasia1@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: fluiddot <carlosgprim@git.wordpress.org> Co-authored-by: gturpin-dev <guillaumeturpin@git.wordpress.org>

What?
Closes #41573
Why?
Video blocks with autoplay enabled fail to work properly on iOS devices. While the muted attribute is automatically added when autoplay is toggled on, iOS devices specifically require the
playsinlineattribute to properly autoplay videos.The current implementation ignores this iOS-specific requirement, resulting in a poor user experience for a significant portion of users, as iOS devices represent a large market share.
How?
This PR extends the existing autoplay logic to automatically set both muted and
playsinlineattributes when autoplay is enabled. When a user toggles on autoplay:Additionally, I've added a help text that informs users when "Play inline" is automatically enabled due to autoplay settings.
Testing Instructions
(You'll need to use an actual iPhone or a simulator for this)
Screenshots or screencast
Before
pre_playsinline.MP4
After
post_playsinline.MP4