Closed indexofrefraction closed 6 years ago
The HTML5 samples on https://howlerjs.com are working for me in Safari. Do you have a sample of something that isn't working?
after a lot of tests i can say
is there anything that could interfere with html5 playback?
if i go to tests/js/core.html5audio.js, remove the click event listener and just start the demo, i get the same behaviour
in my website i have clicks before i start the (html5) sounds.. does it need a play() inside the click event?
Yes. Most browsers these days restrict usage of audio unless an initial sound was played within a click event. This used to be restricted to mobile, but it's coming into desktop land too
ok, but is there a way to determine if this has happened already? can i know if i can play html5 or not?
a) either generally to determine the state b) from an already started howl. if it is really playing or not
for b) howler sound.playing() reports true, even if it isnt playing
Yes, unfortunately, Safari's autoplay policies require that the sound is played within a user interaction like a click. The unlock method we have in howler won't work for this, so you'll have to make it work on your application end.
i noticed that html5 audio does not play in safari desktop (maybe the same in chrome)
play() is called but there is no sound and no console output (promise errors or something)
(note: without html5:true everything works fine)