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
@jtomaszewski
jtomaszewski commented on 5 Mar 2015
Currently we have function destroyPlayer() { ... } methods in every wrapper like soundcloud/youtube, but they are hidden in private scope and can't be called manually. Thus, if I want to f.e. destroy my soundcloud wrapper and to create youtube wrapper, I will receive Uncaught TypeError: Cannot read property 'postMessage' of null errors, because callbacks haven't been removed (similar to mozilla#427).
Simple adding of self.destroy = destroyPlayer; line to popcorn.HTMLYouTubeVideoElement.js and popcorn.HTMLSoundCloudAudioElement.js solves the problem.
I can make a pull request for that, but I'd want to be sure, that it's the best way to do it?
jtomaszewski added a commit to jtomaszewski/popcorn-js that referenced this issue on 11 Jun 2015 @jtomaszewski
Add .destroy() method to media wrappers (mozilla#434) 3e44144 @jtomaszewski
jtomaszewski commented on 11 Jun 2015
I added .destroy() method to all media wrappers in jtomaszewski/popcorn-js@3e44144 .
IMHO it's okay to merge. Optionally, we could add a common test case for all wrappers.
The text was updated successfully, but these errors were encountered:
Issue reported: mozilla#434
Reported by: @jtomaszewski
@jtomaszewski
jtomaszewski commented on 5 Mar 2015
Currently we have function destroyPlayer() { ... } methods in every wrapper like soundcloud/youtube, but they are hidden in private scope and can't be called manually. Thus, if I want to f.e. destroy my soundcloud wrapper and to create youtube wrapper, I will receive Uncaught TypeError: Cannot read property 'postMessage' of null errors, because callbacks haven't been removed (similar to mozilla#427).
Simple adding of self.destroy = destroyPlayer; line to popcorn.HTMLYouTubeVideoElement.js and popcorn.HTMLSoundCloudAudioElement.js solves the problem.
I can make a pull request for that, but I'd want to be sure, that it's the best way to do it?
jtomaszewski added a commit to jtomaszewski/popcorn-js that referenced this issue on 11 Jun 2015
@jtomaszewski
Add .destroy() method to media wrappers (mozilla#434)
3e44144
@jtomaszewski
jtomaszewski commented on 11 Jun 2015
I added .destroy() method to all media wrappers in jtomaszewski/popcorn-js@3e44144 .
IMHO it's okay to merge. Optionally, we could add a common test case for all wrappers.
The text was updated successfully, but these errors were encountered: