loopify icon indicating copy to clipboard operation
loopify copied to clipboard

Autoplay doesn't work on Chrome/Safari for iOS

Open leandroprz opened this issue 6 years ago • 0 comments

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

leandroprz avatar Oct 14 '18 02:10 leandroprz