loopify
loopify copied to clipboard
Autoplay doesn't work on Chrome/Safari for iOS
I'm trying to autoplay and loop a sound file.
This is my code:
<script src="js/loopify.js" type="text/javascript"></script>
<script>
loopify("audio/hello-audio-looped.wav",ready);
function ready(err,loop){
if (err) {
console.warn(err);
}
loop.play();
}
</script>
It works fine on Firefox and Edge, but it doesn't autoplay on Chrome.
I believe it has something to do with this: https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
Is there a workaround for this?
Thank you