I have an implementation of the YouTube Javscript API that works perfectly fine in Chrome and Safari, but not in Firefox. Yes, I'm doing this on a webserver ;)
On document ready, I call my function showVideo();
This is all the relevant code:
In all browsers the player shows, but in Firefox the video doesn't load. My log shows the "loading video" message on firefox, but nothing else happens after that. Not even an error. If I try to call ytplayer.loadVideoById('jc8n44ddy9A', 0); manually after everything is loaded, I get the error ReferenceError: ytplayer is not defined.
I realize that ytplayer isn't explicitly defined as a variable by me, but my guess(?) is that the YouTube API does that because it works in the other browsers. Also if I defined just var ytplayer globally somewhere it doesn't fix it.
Any advise is much appreciated!
Not sure where the other browsers get the ytplayer reference from, but you should have it defined globally (for the example you've given, anyway) and add the reference to it in onYouTubePlayerReady:
ytplayer = document.getElementById( playerId );