Permalink
Browse files

added fix for switching between songs

  • Loading branch information...
1 parent b5e8295 commit 047bb18e3f98b5a1a3f04f667e5a96b8c7f246e8 Eric Matthys committed May 10, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 app/js/plex/view/players/MusicPlayerView.js
@@ -58,6 +58,10 @@ define(
this.$('.now-playing-title').html(this.model.get('title'));
+ if (typeof(this.sound) !== 'undefined') {
+ this.sound.destruct();
+ }
+
this.sound = soundManager.createSound({
id: 'track_' + this.model.id,
url: file,
@@ -132,6 +136,7 @@ define(
onFinish: function () {
this.sound.destruct();
+ this.sound = undefined;
if (typeof(this.nextTrack) !== 'undefined') {
this.model = this.nextTrack;

0 comments on commit 047bb18

Please sign in to comment.