I have a simple HTML/JS file with a button click handler playing an mp3 file via Howler JS. The audio works on desktop (Firefox) but doesnt work on iOS Firefox/Safari. Any clues why?
var sound = new Howl({
src: ['zap.mp3'],
preload: true
});
window.onload = function(){
var playButton = document.getElementById('play-button');
playButton.addEventListener('click', function() {
sound.play();
})
}
For ease of debugging, I deployed a basic html file here. Doing "view source" on it should work, it's pretty basic.
Found the answer, it was in silent mode. Some howler js audio doesnt play in Silent mode and thats a known issue: https://github.com/goldfire/howler.js/issues/1436