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

Youtube player controls & autohide not working

$
0
0

So I added the youtube iframe api to my website and followed the instructions; so this is my code:

var player;function onYouTubeIframeAPIReady() {player = new YT.Player('player', {  height: '390',  width: '640',   controls: '0',  autohide: '1',  videoId: 'I'd rather not display that',  events: {//    'onReady': onPlayerReady,'onStateChange': onPlayerStateChange  }});}

Setting controls to 0 should not display the player's controls as per this article but it's still showing;

Also setting the autohide to 1 should have the progress bar and controls slide out after a couple of seconds as per this article but that also doesn't work.

Am I doing something wrong?


Viewing all articles
Browse latest Browse all 3638

Trending Articles