The audio just stopped playing, I am wondering why. | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
24th Jan 2024, 5:26 PM
Dr Melchisedec Bankole
Dr Melchisedec Bankole - avatar
10 Respostas
24th Jan 2024, 5:55 PM
šŸŒšŸŒŽšŸŒį“€ÉŖį“šŸŒŽšŸŒšŸŒį“µāæįµƒį¶œįµ—ā±įµ›įµ‰
šŸŒšŸŒŽšŸŒį“€ÉŖį“šŸŒŽšŸŒšŸŒį“µāæįµƒį¶œįµ—ā±įµ›įµ‰ - avatar
+ 4
Some browsers, such as Safari, donā€™t allow element focus or automatic audio playing without the user first interacting with the page. I didnā€™t see anything wrong with the code, so it should be valid. It is probably simply disallowed by the browser you are using (the mobile Sololearn applications donā€™t have their own browser, they use someone elses).
25th Jan 2024, 2:12 AM
TacoBlayno
TacoBlayno - avatar
+ 3
You also have a problem with the closing tag on line 40.
25th Jan 2024, 12:02 AM
TacoBlayno
TacoBlayno - avatar
+ 3
That may be tricky. I've also tried the iframe method but with no luck. It is (somewhat understandably) frequently blocked by browsers: https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide#autoplay_and_autoplay_blocking Here's one working example (turn your volume down first!): https://sololearn.com/compiler-playground/W8ODQlIstFcN/?ref=app
25th Jan 2024, 8:33 AM
Scott D
Scott D - avatar
+ 3
I wish all browsers had a way to controll wheather automatic noise is blocked or not, and I wish they all had a way to change the settings for a specific website.
25th Jan 2024, 5:27 PM
TacoBlayno
TacoBlayno - avatar
+ 2
AIM, your response is so helpful. The tutorial, straight to the point. You are the best!
25th Jan 2024, 1:16 AM
Dr Melchisedec Bankole
Dr Melchisedec Bankole - avatar
+ 2
TacoBlayno Yeah, sometimes it's annoying and invasive. Fortunately most times I visit sites where video popups occur they have it coded so the audio is muted; you have to unmute if you want to listen. Fortunately I've rarely encountered sites with autoplay audio.
25th Jan 2024, 6:31 PM
Scott D
Scott D - avatar
+ 1
TacoBlayno, you have the eagle eyes to spot the missing '>' in the "</button " closing tag. Thanks!
25th Jan 2024, 1:19 AM
Dr Melchisedec Bankole
Dr Melchisedec Bankole - avatar
+ 1
The autoplay is not working. Why?
25th Jan 2024, 1:23 AM
Dr Melchisedec Bankole
Dr Melchisedec Bankole - avatar
0
H
26th Jan 2024, 3:54 PM
Free fire
Free fire - avatar