From 9edc5cb30b2b61e20f88cb8a1a52f0bcec1152f5 Mon Sep 17 00:00:00 2001 From: John Harman Date: Tue, 5 Mar 2013 15:44:33 +0000 Subject: [PATCH] When a player is removed the internal array is updated. Bug fixed: When the player's "remove" function is called it doesn't remove the internal reference to the removed player. When the pauseOtherPlayers option is true, the player being used is flash and the flash dom element has been removed an error is thrown when the next video is played. --- src/js/mep-player.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/js/mep-player.js b/src/js/mep-player.js index bbe94f1c2..751e3c634 100644 --- a/src/js/mep-player.js +++ b/src/js/mep-player.js @@ -1068,6 +1068,9 @@ if (!t.isDynamic) { t.$node.insertBefore(t.container) } + + // Remove the player from the mejs.players array so that pauseOtherPlayers doesn't blow up when trying to pause a non existance flash api. + mejs.players.splice( $.inArray( t, mejs.players ), 1); t.container.remove(); }