Make an embeded video play on button click

Hello guys,

first of all, I’m sorry for opening another topic while there are already a few out there that are covering similar problems. But yesterday I tried the whole day to fix this myself by following the other topics and I couldn’t. Probably because I don’t know anything about coding and it was really hard for me to follow them.

However, what I want to create is a looping gif that is playing on my home page and if the gif, or better the text on top of it, is clicked, the gif gets hidden and an embedded video shows up. Everything to this point I achieved myself, but now I want the video to play immediately after the text got clicked. I just can’t get it to work. Can anybody help?

Also here is a read-only link to my website:

https://preview.webflow.com/preview/morn-art-d87877e17b3b7c3b99aeee068eb270?utm_medium=preview_link&utm_source=designer&utm_content=morn-art-d87877e17b3b7c3b99aeee068eb270&preview=6d962b24941cf738a115f4cf9c80e8ed&mode=preview

(I noticed that you need to toggle the preview off and on again to work properly)

Thanks so much for your help!

You have to set your vimeo video to “autoplay”.
Here it is explained:

Works only on your published project and you have to use the “embed” component for your video.

If you don’t want to use vimeo you can use background video.

Unfortunately, since last year the autoplay doesn’t work anymore in every browser and I need the “click” to manual play the video.
But thanks for your help so far!

This is not a autoplay function. The script only says play the video.

Ok, I will try to implement this and get back to you if I come across any problems. Thank you!

Just wanna make sure you know this. You can only see the result on the published site, not in the preview.

Thanks for the information Tore! I will test everything tonight.