You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browser IssuesIssues or PRs that are related to browser specific problems[Block] CoverAffects the Cover Block - used to display content laid over a background image[Status] In ProgressTracking issues with work in progress
I found that the video didn't play on Google Chrome on iOs (using xs & 8+) on Safari or Google Chrome. On Android (using Samsung Note 9), the video started on Chrome and then froze; with Microsoft Edge the blurry video image didn't even load only a placeholder box.
I expected that if the auto-play video isn't supported or doesn't start on mobile browsers that the video thumbnail would be what shows (similar to when autoplay is disabled on mobile for other video blocks). Or that a static image could be chosen as a fall back similar to how the Media header for Twentyseventeen is set up.
I came across this too. Video backgrounds do not have full mobile browser support. It would be helpful to at least be able to set a fallback image for when the video doesn't play, as per #18962
The heuristics for allowing mobile autoplay are also outlined there:
<video> elements will be allowed to autoplay without a user gesture if their source media contains no audio tracks.
<video muted> elements will also be allowed to autoplay without a user gesture.
<video autoplay> elements will only begin playing when visible on-screen such as when they are scrolled into the viewport, made visible through CSS, and inserted into the DOM.
<video autoplay> elements will pause if they become non-visible, such as by being scrolled out of the viewport.
The document also notes the behavior of playsinline:
On iPhone, <video playsinline> elements will now be allowed to play inline, and will not automatically enter fullscreen mode when playback begins. <video> elements without playsinline attributes will continue to require fullscreen mode for playback on iPhone.
When exiting fullscreen with a pinch gesture, <video> elements without playsinline will continue to play inline.
So it seems like playsinline is necessary because otherwise the video will require fullscreen to be played, and that happens only if you tap the video. We already add muted. So the following markup should work:
Browser IssuesIssues or PRs that are related to browser specific problems[Block] CoverAffects the Cover Block - used to display content laid over a background image[Status] In ProgressTracking issues with work in progress
Activity
zimjjan commentedon Nov 10, 2019
+1
marcuswisecaesar commentedon Nov 19, 2019
+1
2504115-zen
separatelyunited commentedon Jan 16, 2020
+1 to this.
I found that the video didn't play on Google Chrome on iOs (using xs & 8+) on Safari or Google Chrome. On Android (using Samsung Note 9), the video started on Chrome and then froze; with Microsoft Edge the blurry video image didn't even load only a placeholder box.
I expected that if the auto-play video isn't supported or doesn't start on mobile browsers that the video thumbnail would be what shows (similar to when autoplay is disabled on mobile for other video blocks). Or that a static image could be chosen as a fall back similar to how the Media header for Twentyseventeen is set up.
Missing video on Edge:

Video started then froze on Chrome using Android:

Not started at all on iOs:

khristiansnyder commentedon Feb 11, 2020
+1
Encountered this issue today as well.
eamcgill90 commentedon Mar 18, 2020
Reported here: 19496236-hc
benchilcote commentedon Mar 20, 2020
I found this to be a suitable workaround:
https://wordpress.org/plugins/advanced-backgrounds/
pburke commentedon Mar 25, 2020
Workaround for anyone looking:
openfist commentedon Mar 26, 2020
reporting this issue as well
#2819740-zen
donalirl commentedon Apr 23, 2020
I came across this too. Video backgrounds do not have full mobile browser support. It would be helpful to at least be able to set a fallback image for when the video doesn't play, as per #18962
jasmussen commentedon May 14, 2020
Mobile Safari has a few heuristics built in for when it allows autoplay on mobile, for example it blocks playback if the device is in "low power mode".
The heuristics for allowing mobile autoplay are also outlined there:
<video>elements will be allowed to autoplay without a user gesture if their source media contains no audio tracks.<video muted>elements will also be allowed to autoplay without a user gesture.<video autoplay>elements will only begin playing when visible on-screen such as when they are scrolled into the viewport, made visible through CSS, and inserted into the DOM.<video autoplay>elements will pause if they become non-visible, such as by being scrolled out of the viewport.The document also notes the behavior of
playsinline:So it seems like
playsinlineis necessary because otherwise the video will require fullscreen to be played, and that happens only if you tap the video. We already addmuted. So the following markup should work: