Permalink
Browse files

jQuery.tubeplayer.defaults.afterReady wasn't getting passed the tubep…

…layer object in the iframe player case - fixed + minified
  • Loading branch information...
1 parent 2371f71 commit 2b04608451ddd85784e4796c4b9a89ca31c8af47 Nirvana Tikku committed Apr 5, 2013
Showing with 7 additions and 3 deletions.
  1. +5 −1 jQuery.tubeplayer.js
  2. +2 −2 jQuery.tubeplayer.min.js
View
@@ -397,7 +397,7 @@
TubePlayer.ytplayers[o.playerID] = evt.target;
- var $player = $(evt.target).parents("."+TUBE_PLAYER_CLASS);
+ var $player = $(evt.target.getIframe()).parents("."+TUBE_PLAYER_CLASS);
$.tubeplayer.defaults.afterReady($player);
@@ -812,6 +812,10 @@
delete $.tubeplayer.events[p.opts.playerID]; // flash callback ref's
+ if('destroy' in p.ytplayer){
+ p.ytplayer.destroy();
+ }
+
$(p.ytplayer).remove();
return null;
View
Oops, something went wrong.

0 comments on commit 2b04608

Please sign in to comment.