I just was checking my youtube player in IE 8 and noticed the 'onReady', 'onStateChange' events are not firing. The initPlayer method is being called and the video plays, but the events are not firing.
Works as expected on Safari, Firefox Mac, FireFox Win.
Am I missing something here?
Here is the relevant code:
MyPlayer.prototype = {
/* [...] */
initPlayer: function () {
var that = this;
alert("initPlayer: (IE 8 gets this far)");
this.player = new YT.Player(this.cfg.divTagId, {
height: this.cfg.height,
width: this.cfg.width,
videoId: this.cfg.videoId,
origin: location.host,
playerVars: {
controls: this.cfg.controls,
wmode: 'opaque',
fs: 0
},
events: {
'onReady': function (event) {alert("onReady")},
'onStateChange': function (event) {alert("onChange")}
}
});
},
/* [...] */
}