Autoplay not working - Video from Vimeo

Hey there!

I’m trying to have a few Vimeo videos on autoplay but I can’t make it work.

I need to add them in autoplay on a Rich Text element of a CMS item.
So, once inside the Rich Text, I tried two methods:

  1. adding a Video element and pasting URL like https://player.vimeo.com/video/[myVideoId]?autoplay=1

  2. Adding Embedded code like:

Video loads but not on autoplay… What am I missing? Any thoughts? Thanks a lot!

Hey @Quitos, autoplay feature is picky within browsers. The supported instance in most browsers is when it is muted as seen from CanIUse:

Turn on mute along with autoplay and see if that works for you. Also, you do not have to use a code embed necessarily. Webflow has a Video Element that can be used and it has selector fields for autoplay.

2 Likes

Hey! Thanks for your reply!

Yeah, I forgot to mention that I’m using muted as well and it’s not working either.

https://player.vimeo.com/video/[myVideoId]?autoplay=1&**?muted=1**

Also, you do not have to use a code embed necessarily. Webflow has a Video Element that can be used and it has selector fields for autoplay.

I know, but I can’t use a Video Element in this case because I’m adding the video inside the Rich Text feature of a CMS item, which only offers a simplified video element or a custom code for embedding an iframe (see screenshot below)

Screen Shot 2021-07-26 at 22.33.00

Ok, 5 mins later it’s working now, lol.

Apparently when adding muted=1 on the embedded iframe solved the issue (but not when using the video feature directly on Rich Text - that way adding muted on the URL does nothing…).

<iframe src="https://player.vimeo.com/video/[myVideoId]?autoplay=1&muted=1&loop=1&color=ffffff&title=0&byline=0&portrait=0" style="position:absolute;top:0;left:0;width:100%;height:100%;" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>

Above works for me :+1:

1 Like

Hi again, now I have a second problem… I need the video UNMUTE on a click trigger. How can I do these?

Take a look at the Vimeo player API. You can use methods and events to control the player.