Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

Embeded YouTube video must be autoplayed with voice..?

$
0
0

I'm working on a Web Application and our client is demanding that video must be autoplayed with voice when a user vists it.Here is what I'm doing:

HTML:

<embed id="video1"   src="" wmode="transparent" type="application/x-        shockwave-flash" width="538" height="580"  allowfullscreen="true"       title="Adobe Flash Player"></embed>

JavaScript:

window.onload = function() {            var url = "<?= $pagedata->aboutus_videourl;?>";            url = url.split('v=')[1];            $("#video")[0].src = "https://www.youtube.com/v/"+ url +"&mute=1"+"?autoplay=0" ;            };       function autoplay(){       $('#video1').attr('src',$('#video').attr("src").replace("autoplay=0", "autoplay=1"));          }

If I set &mute=0 the video autoplays with voice but not in chrome. So how I can force video to autoplay with voice in chrome also.Thanks in Advance.


Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>