richard.g.engle
Coder
Chrome wont autoplay a video embedded with javascript, unless its muted. But i cant figure out how to use code to unmute it.
problem is that i am repurposing code [listed below, and in link]. it embeds video in an iframe. there is no variable to access the mute of that i can see. thus the vid variable below doesn work.
The whole code is at https://codepen.io/richardengle/pen/poNjvpY
Line 33 of the area of JS code is where i would change. you can see the vid muted/unmuted part, but it wont unmute the video. Any advice is welcomed
----- part of code----
problem is that i am repurposing code [listed below, and in link]. it embeds video in an iframe. there is no variable to access the mute of that i can see. thus the vid variable below doesn work.
The whole code is at https://codepen.io/richardengle/pen/poNjvpY
Line 33 of the area of JS code is where i would change. you can see the vid muted/unmuted part, but it wont unmute the video. Any advice is welcomed
----- part of code----
,$('button#play20s').click( function() {
$('body').removeClass().addClass('on playing20s');
$("#knob").trigger('play');
$("#tune").trigger('play');
$('.video-embed').remove();
$('body').append('<iframe id="decade-20" class="video-embed" width="560" height="315" src=" " frameborder="0" allowfullscreen ></iframe>');
var vid = document.getElementById("decade-20");
vid.muted =false;
//https://www.youtube.com/embed/gTevoUhDeoM?&theme=dark&autoplay=1&keyboard=1&autohide=2&start=10&mute=1
});