+ 3
why autoplay isn't working?
5 Antworten
+ 3
If you are viewing from a mobile device, i do not think autoplay works, it will only work from a computer
+ 2
here is your solution from now you canhttps://www.sololearn.com/Discuss/1291724/?ref=app
+ 1
https://stackoverflow.com/questions/34837930/audio-tag-autoplay-not-working-in-mobile
+ 1
can ny1 suggest a hack for it?
+ 1
Hi 2+2
You have to launch audio using a touch event. There are also some particularities with looping.
Here is what I found on Stack exchange from güney-saramalı which seems to work.
"If you play() the audio with gesture for 1 time then you would be able to pause() set currentTime = 0; and then play() again without user gesture. The code below creates an endless loop for mobile and desktop without any problem"
http://cr8code.co/editor.php?workid=82bc38eb384ee5ea21b5197421a15d1c