howler.js
howler.js copied to clipboard
onplayerror not firing (2.1.2)
using the code from the documentation i can not get onplayerror to fire
with example below / on safari and chrome desktop: audio play is denied, but onplayerror does not fire the sound then plays with the first touch/click (onplay is fired)
var sound = new Howl({
src: ['blank.webm', 'blank.mp3'],
onplay: function() {
console.log('audio playing!');
},
onplayerror: function() {
console.log('audio play denied!');
sound.once('unlock', function() {
console.log('audio play unlocked!');
});
}
});
sound.play();
ps. as playing limitations affect all mayor browsers now, maybe the error messages could be updated (line 898 and 917)