Muted youtube video not working

Good morning,

I have the following code:

<div class="videoWrapper">
    <!-- Copy & Pasted from YouTube -->
    <iframe id="myVideo" width="560" height="349" src="https://www.youtube.com/embed/hygetkMbUto?autoplay=1&loop=1&playlist=hygetkMbUto" frameborder="0" allowfullscreen></iframe>
</div>

<style>
.videoWrapper {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 */
	padding-top: 25px;
	height: 0;
}
.videoWrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

And then on the settings of my website, on Custom head code I have the following:

<script type="text/javascript">
var myVideo =  iframe.getElementById('myVideo'); 
myVideo.mute();
</script>

But the video is playing with sound :/. At the beginning, it was working, but suddenly it doesn’t work.

Does anyone know the reason?

Thanks in advance,
Sabrina.

Welcome to the Webflow forum!

Could you please edit your post Screenshot_2017-08-16_140811 and provide ALL the necessary details in your post so we can take a look at your site/issue?

If you want faster replies and more accurate answers, it is recommended that you put in a bit more effort to include all the details listed in this link, so that forum members don’t have to waste time following up with you to request more information.

Hope to hear from you soon. Thanks!