ngAudio icon indicating copy to clipboard operation
ngAudio copied to clipboard

NgAudioObject.error never conctains an error in case of incorrect url

Open Ilya-Hubich opened this issue 9 years ago • 1 comments

Hi.

I've found the next code in 'remoteAudioFindingService'

audio.addEventListener('error', function() { deferred.reject(); }); audio.addEventListener('loadstart', function() { deferred.resolve(audio); });

In case of incorrect url 'loadstart' event fires first and resolve promise. And then 'error' event fires( promise is already resolved in this case ).

So NgAudioObject.error is not contain an Error.

Ilya-Hubich avatar Feb 03 '17 08:02 Ilya-Hubich

Sounds fair, please submit a pull request

danielstern avatar Mar 19 '17 17:03 danielstern