Open
Description
Getting the error TypeError: Cannot read property 'release' of null
while invoking destroy on CordovaAudioSoundInstance. I was able to debug the issue and figured that the below code is throwing the error inside the destroy()
function
this._playbackResource.release();
since the _playbackResource
is set to null in the method call this.AbstractSoundInstance_destroy();
I did update the destroy method to the following and it worked fine
p.destroy = function() {
// call parent function, then release
this._playbackResource.pause();
this._playbackResource.release();
this.AbstractSoundInstance_destroy();
};
Is the fix appropriate?