Rayman / fusic-meteor

Fusic: Realtime Social Music Collaboration
MIT License
27 stars 12 forks source link

[Bug] Player crash when switching playlists #67

Closed pepf closed 10 years ago

pepf commented 10 years ago

I think this is new, maybe because of iron router. Try switching playlists when playing a song and the youtube player will not work in the new playlist. Errors like these appear:

Exception from Deps recompute function: TypeError: Cannot read property 'postMessage' of null
    at Q.g.C (https://s.ytimg.com/yts/jsbin/www-widgetapi-vfl05d7dI/www-widgetapi.js:26:344)
    at T (https://s.ytimg.com/yts/jsbin/www-widgetapi-vfl05d7dI/www-widgetapi.js:21:455)
    at Q.w.(anonymous function).wb.(anonymous function) [as loadVideoById] (https://s.ytimg.com/yts/jsbin/www-widgetapi-vfl05d7dI/www-widgetapi.js:30:89)
    at http://localhost:3000/client/views/common/footer.js?88ce1a2266772a6107cf296065c39195b0a228bb:161:16
    at Deps.Computation._compute (http://localhost:3000/packages/deps.js?b8042fd8eaf6c998f471f7afcfaa3cd47abc4aec:214:36)
    at Deps.Computation._recompute (http://localhost:3000/packages/deps.js?b8042fd8eaf6c998f471f7afcfaa3cd47abc4aec:228:14)
    at Deps.flush (http://localhost:3000/packages/deps.js?b8042fd8eaf6c998f471f7afcfaa3cd47abc4aec:322:14) 

It has to do with the order of building the DOM and attaching the player to the right div. The link gets lost somewhere. I have a strong feeling it has to do with the session variables, which remain during navigation while the youtube player seems to be removed.