I’ve done a lot of the webflow tutorials and am starting to learn how other sites are built. There’s a feature the website weareversus dot tv that has an embeded vimeo link and then auto plays on hover. Scroll down to "featured projects and the 3 following videos all have this incredible feature. This code is also seen on their works page too.
I have looked for tutorials everywhere and I can’t seem to find anything that works for vimeo.
Anyone either know how to explain or break down how this code works? Or any tutorials that can show me the steps to get this final result?
You can embed Vimeo videos in Webflow using the embed element. Here’s how to implement it with auto-play on hover:
Go to the Add panel and drag an embed element onto your canvas
Get your Vimeo embed code
In the embed element settings, paste your Vimeo embed code
To enable auto-play on hover, add these parameters to your Vimeo iframe URL:
?background=1&autoplay=1&loop=1&byline=0&title=0
Add this custom code to your embed element:
<script>
var player = document.querySelector('iframe');
player.muted = true;
</script>
The background parameter removes controls, while autoplay=1 enables auto-play functionality. Remember that most browsers require videos to be muted for auto-play to work.
Hopefully this helps! If you still need assistance, please reply here so somebody from the community can help.
You could hire me to write it for you, but I am full with priority projects for the next few weeks.
I’d recommend you research examples online and possibly use a tool like ChatGPT to find a working solution.
No idea what your current code is but again, GPT or a dev can help you.
I’d have to see it and do some R&D.
If you’re using the Vimeo player, and that player IFRAME is consuming your scroll wheel(?) events, you might be able to do an overlay on top of the IFRAME to effectively clickjack your own site.
But research the problem, there may be well developed solutions that you can find on e.g. stackoverflow or a dev’s blog.