You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
giannif edited this page Dec 16, 2014
·
1 revision
You can push callbacks into the _pjsPlayerReady array and they will fire for every new player that's created. This gives you nice decoupling.
var_pjsPlayerReady=_pjsPlayerReady||[];_pjsPlayerReady.push(function(player){// I didn't create this player, but I can still tie into events.player.on("stateChange",function(event){});});});
_pjsPlayerReady is a global variable, be sure not to override it.