I have a video which i want to play in the website like www.paypal.com
playing a video without audio on landing.
Is this a BUG? But when i tried as following, i cant mute the audio at all, even the volume parameter is set to 0.
How can i mute the audio?
<iframe id="bg" src="https://www.youtube.com/embed/VfcZsyhUJ48?autoplay=1&controls=0&loop=1&showinfo=0&modestbranding=1&disablekb=1&enablejsapi=1&rel=0" frameborder="0" volume="0"
style="width: 100%;height:100%;
opacity: 0.80 !important;"
allowtransparency="true"></iframe>
EDIT:
Troll 1: How to play lowest to highest? depending on mobile users?
/*
Yes there is:
https://www.youtube.com/embed/kObNpTFPV5c?vq=hd1440
https://www.youtube.com/embed/kObNpTFPV5c?vq=hd1080
etc...
Options are:
Code for 1440: vq=hd1440
Code for 1080: vq=hd1080
Code for 720: vq=hd720
Code for 480p: vq=large
Code for 360p: vq=medium
Code for 240p: vq=small
*/
Troll 2: How to play random Youtube videos?
/* YouTube - playlister*/
var videos = [];
videos[0] = 'youtubeID';
videos[1] = 'youtubeID';
videos[2] = 'youtubeID';
videos[3] = 'youtubeID';
var ii = Math.floor( (Math.random()*4 ) );
var play_now = videos[ii];
var yt = 'https://www.youtube.com/embed/'+ play_now + '?autoplay=1&controls=0&loop=1&showinfo=0&modestbranding=1&disablekb=1&enablejsapi=1&rel=0&vq=medium';
Troll 3: How to keep playing YouTube video when it ends? and loop=true does not work?
function onStateChange(e) {
if (e.data === YT.PlayerState.ENDED) {
player.playVideo();
}
}
or
onStateChange: function(e){
var id = 'qzZuBWMnS08';
if(e.data === YT.PlayerState.ENDED){
player.loadVideoById(id);
}
}