I built a player on top of videoJS and I'm having trouble accessing public functions inside videoJS .ready()
. The thing is that my code appears to be working everywhere except IE (works in chrome, safari, ff, etc.):
var myPlayer = _V_('myvideojsId');
myPlayer.ready(function() {
var player = this;
player.myPublicFunction = function() {
alert("hey!");
}
});
myPlayer.myPublicFunction();
In IE I get
Object does not support this property or method
on the myPlayer.myPublicFunction()
line. Are the other browsers letting me get away with bad code or is this IE's fault?
Any help would be great, thank you!
Chris