Embed youtube video that starts automatically

Hi all,

I’m wondering if it’s possible to embed a youtube video that starts automatically in a loop but without sound. The video should have the controls in case the user wants to enable the sound, pause the video, etc.

Thanks in advance,

Sabrina.

Try this code generator

Valid XHTML YouTube embed code generator - Online tools

Hi @samliew,

I checked the code generator and it works fine. The only downside is that the video has sound. Is there any possibility of having the video without sound? (if the user wants to hear the sound, he/she should be able to click on the volume control and enable the sound).

Thanks!

You’re right, the only way is to use the Youtube API.

Here’s a tutorial html - YouTube: How to present embed video with sound muted - Stack Overflow

Hi,

Do you know where do I have to add the javascript code? Because I add it to “me website - settings - custom code - header” but it doesn’t do anything. It seems that the page doesn’t recognize the code.

Here are the only places where you can add custom code

Custom code in head and body tags | Webflow University
Custom code | Webflow University

ah ok, great now works. But now I have another problem ahahaha. I want the video to be responsive to all devices and to fill the whole screen width. However, in that code, I can’t use percentages.

Is there any solution for this?

Thanks a lot!