danielstern/ngAudio

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

Closed this issue · 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.

Sounds fair, please submit a pull request