Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/soundjs/cordovaaudio/CordovaAudioSoundInstance.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,10 @@ this.createjs = this.createjs || {};
};

p.destroy = function() {
// call parent function, then release
this.AbstractSoundInstance_destroy();
// pause and release the playback resource, then call parent function
this._playbackResource.pause();
this._playbackResource.release();
this.AbstractSoundInstance_destroy();
};

/**
Expand Down Expand Up @@ -178,7 +179,7 @@ this.createjs = this.createjs || {};

p._handleCleanUp = function () {
clearTimeout(this._audioSpriteTimeout);
this._playbackResource.pause(); // OJR cannot use .stop as it prevents .seekTo from working
// OJR cannot use .stop as it prevents .seekTo from working
// todo consider media.release
};

Expand Down