+ 6
setTimeout not working 🤔
Please help me to solve this error 🙂 And why it's play when I touch on screen within 2 seconds https://code.sololearn.com/WjSlXvDi587A/?ref=app
10 Réponses
+ 6
I think Browsers has stopped supporting the play of audios after page loads without interacting with the page and can only be initiated when it has registered a gesture 🤷🏻.
+ 4
for security reasons auto playing audios will not work on SOLOLEARN. It will only work if the user start the audio by his own hands. But if you still want to autoplay then you should trick the user.
For example, trick the user so that he/she will force to touch the screen, from there you can start the audio
like create an ad popup, a custom alert Box, or just by simply touching the screen one time. This way you can force them to start the audio.
👇👇👇👇 read this about blocking of auto play audio
https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide
+ 3
Amaani yeah but only in w3school
+ 2
I think it is Sololearn, I tried pasting the code into W3schools tryIt editor and it worked fine
+ 2
Check the code
https://code.sololearn.com/WS1RhRi7Q8g9/?ref=app
+ 2
Hmm only here on sololearn you cant do this. I tried this many times but here it is not supported due to some reason. this is because of older version of browser engion used by sololearn.
+ 2
Cheque your browser version 🌍🌎🌏ᴀɪᴍ🌍🌎🌏
It's working for me
+ 1
丹ⓨㄩک廾 not working in Chrome and opera 🤔
0
ㅤMr. N♡ ♡N€☆ ㅤㅤ music not working 🙁
- 1
I think you need write js code to "js"(you write js to html)