Hi, I'm a newbie, so apologies if this is a dumb question or in the wrong place or wrong format.
Below is some code which I'm using to display embedded YouTube videos from a playlist (banners[] ).
Everything works fine except that I cannot get the embedded YouTubes to allow full screen, despite the "allowfullscreen" in the document.write.
Can anyone tell me where I'm going wrong? The script is lifted from elsewhere, and I've only made minor modifications, so I'm a little out of my depth. It sits in the body of an HTML document, inside a div (but it makes no difference if I take it out of the div).
(Incidentally, if I just copy and paste a full YouTube embed code, it works fine and allows full screen).
Any help appreciated - thanks!
Paul
(code follows):
<SCRIPT LANGUAGE="JavaScript">
function random_banner(){
var i=0;
banners = new Array();
banners[0] = '4ErEBkj_3PY';
banners[1] = 'XH-groCeKbE';
banners[2] = 'UhlvEIxFM1k';
return banners[Math.floor(Math.random()*banners.length)];
}
document.write('<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/' + random_banner() + '&hl=en&fs=1fs=1&autoplay=1"></param><param name="allowfullscreen" value="true"></param><embed src="http://www.youtube.com/v/' + random_banner() + '&hl=en&fs=1fs=1&autoplay=1" allowfullscreen="true" width="510" height="413"></embed></object>')
</SCRIPT>