Streaming live at 10am (PST)

Embed youtube video that starts automatically


#1

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.


#2

Try this code generator

https://www.tools4noobs.com/online_tools/youtube_xhtml/


#3

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!


#4

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

Here’s a tutorial https://stackoverflow.com/questions/35044594/youtube-how-to-present-embed-video-with-sound-muted/41045251#41045251


#5

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.


#6

Here are the only places where you can add custom code

https://university.webflow.com/article/how-to-add-custom-head-and-body-code-to-a-webflow-site
https://university.webflow.com/article/embed


#7

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!