Skip to content
This repository has been archived by the owner on Jan 8, 2021. It is now read-only.

Commit

Permalink
Follow-up from mediaelement#779 and mediaelement#788
Browse files Browse the repository at this point in the history
mediaelement#788 tried to fix part of what mediaelement#779 did, but didn't acknowledge that
`mejs.players` is no longer an array, being an object now (a change
introduced by mediaelement#779). As such, remove() now throws a "splice is not
defined" error at that point.

This fix replaces the line added by mediaelement#788 with mediaelement#779's equivalent, but
preserves (and rectifies) the comment above.
  • Loading branch information
odnamrataizem committed Mar 15, 2013
1 parent ee5c64f commit 74695c5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/js/mep-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -1087,13 +1087,12 @@
/*else*/ 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);
// Remove the player from the mejs.players object so that pauseOtherPlayers doesn't blow up when trying to pause a non existance flash api.
delete mejs.players[t.id];

t.container.remove();
t.globalUnbind();
delete t.node.player;
delete mejs.players[t.id];
}
};

Expand Down

0 comments on commit 74695c5

Please sign in to comment.