Vimeo autoplay and loop does not work ;(
-
Hey guys,
for a client-website I wanted insert vimeo videos with "autoplay"... https://vimeo.com/349093088 But it does not work ;(
A HTML code with the vimeo auto function unfortunately also does not work, the same result. Only the MP4 files work with autoplay.
(Would it also be possible to insert vimeo files into cover options or into intro one day... that would be awesome)
Best and thx!!!
-
Dear @Markus
Thank you for the Bug report 🌝
I believe this is due to Modern browser laws and not Lay Theme. Modern browsers will not allow autoplay if there is sound. This was implemented i think in 2011-14? (unsure exactly)When adding the Vimeo +more - HTML you need to add some extra
muted
parameters to get it to work.
Here for example:
Unmuted (autoplay is cancelled in browser)
<iframe src="https://player.vimeo.com/video/349093088?h=afc3752306&autoplay=1&loop=1&title=0&byline=0&portrait=0" width="640" height="360" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen></iframe>
Muted - Now autoplays in browser
<iframe id="vimeo_player" src="https://player.vimeo.com/video/349093088?autoplay=1&loop=1&autopause=0&muted=1" width="640" height="360" frameborder="0" muted webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
You can see the result in action here on a test-page:
https://rickei3.dreamhosters.com/vimeo-autoplay-embed-bug/
&Muted=1
is added to thesrc
and alsomuted
is added on its own near the end.A little tricky as i cant see any muted option for Vimeo when "share"'ing the embed... Sorry that its a bit difficult.
Does this help Markus or wont suit your needs?
"(Would it also be possible to insert vimeo files into cover options or into intro one day... that would be awesome)"
Added to the development notes ✅ 🌝
Talk soon & best wishes
Richard
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it