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.