+ 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

17th May 2022, 11:53 AM
๐ŸŒ๐ŸŒŽ๐ŸŒAIM๐ŸŒ๐ŸŒŽ๐ŸŒ
๐ŸŒ๐ŸŒŽ๐ŸŒAIM๐ŸŒ๐ŸŒŽ๐ŸŒ - avatar
11 Answers
+ 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 ๐Ÿคท๐Ÿป.
17th May 2022, 12:22 PM
เธฟโ‚ณเธฟษŽโฑ ร˜โ‚ฑษ†โฑค ๐Ÿผ
เธฟโ‚ณเธฟษŽโฑ ร˜โ‚ฑษ†โฑค ๐Ÿผ - avatar
+ 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
17th May 2022, 1:38 PM
NonStop CODING
NonStop CODING - avatar
+ 3
Amaani yeah but only in w3school
17th May 2022, 3:53 PM
๐ŸŒ๐ŸŒŽ๐ŸŒAIM๐ŸŒ๐ŸŒŽ๐ŸŒ
๐ŸŒ๐ŸŒŽ๐ŸŒAIM๐ŸŒ๐ŸŒŽ๐ŸŒ - avatar
+ 2
I think it is Sololearn, I tried pasting the code into W3schools tryIt editor and it worked fine
17th May 2022, 1:11 PM
Amaani
Amaani - avatar
17th May 2022, 1:24 PM
Chigozie Anyaeji ๐Ÿ‡ณ๐Ÿ‡ฌ
Chigozie Anyaeji ๐Ÿ‡ณ๐Ÿ‡ฌ - avatar
+ 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.
17th May 2022, 3:10 PM
Ayush Kumar
Ayush Kumar - avatar
+ 2
18th May 2022, 1:38 AM
Ayush Kumar
Ayush Kumar - avatar
+ 1
ไธนโ“จใ„ฉฺฉๅปพ not working in Chrome and opera ๐Ÿค”
17th May 2022, 3:23 PM
๐ŸŒ๐ŸŒŽ๐ŸŒAIM๐ŸŒ๐ŸŒŽ๐ŸŒ
๐ŸŒ๐ŸŒŽ๐ŸŒAIM๐ŸŒ๐ŸŒŽ๐ŸŒ - avatar
17th May 2022, 3:54 PM
๐ŸŒ๐ŸŒŽ๐ŸŒAIM๐ŸŒ๐ŸŒŽ๐ŸŒ
๐ŸŒ๐ŸŒŽ๐ŸŒAIM๐ŸŒ๐ŸŒŽ๐ŸŒ - avatar
- 1
I think you need write js code to "js"(you write js to html)
18th May 2022, 9:29 PM
ะ•ะฒะณะตะฝะธะน
ะ•ะฒะณะตะฝะธะน - avatar