I am loading the YouTube player API as follows:
var player;
function onYouTubeIframeAPIReady() {
console.log("iframe ready");
player = new YT.Player('player', {
height: '390',
width: '640',
events: {
'onReady': onPlayerReady,
'onStateChange': onPlayerStateChange
}
});
}
function onPlayerReady(){
console.log("player ready");
}
On chrome both the IFrame ready and the player ready events get fired, but on Firefox, only the iframe ready gets fired, and I never see the onPlayerReady event fire.
I was wondering what the possible causes of this issue are, and whether or not there is a workaround. I am unable to access player functions such as loadPlaylist due to this issue.
Thanks