mozilla/togetherjs — pull request #929 by maxsong1002 (2013-12-05 02:26:05+00:00)
Title: youtube module fix: onStateChange event target is not a complete player ...

...object. A player is retrieved directly from the iframe instead of the event.

I found out my example application and the youtube module suddenly broke for some reason! I noticed that after the first reinitialization when another video was loaded, the onStateChange event kept returning an incomplete player object that didn't have all the necessary functions. As a workaround, I simply retrieve a player object from the stored data attached to the iframe instead of event.target.

I am not sure if this problem has been recently introduced for whatever reason. Such issue was not present when I first committed the module and example. Weird!