+ 1

{SOLVED}Please Help Me With Audio Element

How Can I Make Audio AutoPlay In HTML?... I kept autoplay in audio element its not working. How can i do it? Please say me..

2nd Dec 2020, 1:39 PM
Mr.Kalyankumar
Mr.Kalyankumar - avatar
16 odpowiedzi
2nd Dec 2020, 1:57 PM
ㅤㅤㅤ
+ 9
Oh!!! Okk wait
2nd Dec 2020, 2:02 PM
ㅤㅤㅤ
+ 8
Mr.Kalyankumar check again,it's working bro
2nd Dec 2020, 2:01 PM
ㅤㅤㅤ
+ 8
Mr.Kalyankumar check again bro it's will take some time because your music is from dropbox I added body.onclick event when you click anywhere on window the audio will starts playing...
2nd Dec 2020, 2:28 PM
ㅤㅤㅤ
+ 8
Hii Mr.Kalyankumar If you are asking to play "audio" automatically then you can use autoplay loop attributes.. As an example - https://code.sololearn.com/W2D5Woet5ww2/?ref=app And yea don't forget to have a look on the lesson provided by sololearn on "the audio element" Hope this helps ✌️
2nd Dec 2020, 3:03 PM
Piyush
Piyush - avatar
+ 3
Mr.Kalyankumar please attach your code attempt and i will try to help you.
2nd Dec 2020, 1:54 PM
Matias
Matias - avatar
2nd Dec 2020, 1:54 PM
Mr.Kalyankumar
Mr.Kalyankumar - avatar
+ 2
Matiyas please help me
2nd Dec 2020, 1:55 PM
Mr.Kalyankumar
Mr.Kalyankumar - avatar
+ 2
Hmm.. ok😔
2nd Dec 2020, 2:03 PM
Mr.Kalyankumar
Mr.Kalyankumar - avatar
+ 2
Piyush[21 Dec❤️] i tried it and the audio is playing, but not automatically... I have learnt the audio lesson from html, it wasn't working so i have requested a question, but ᕙ(@°▽°@)ᕗ {inactive} bro has solved my problem ☺️
2nd Dec 2020, 3:09 PM
Mr.Kalyankumar
Mr.Kalyankumar - avatar
+ 1
ᕙ(@°▽°@)ᕗ {inactive} its not working(your code)..... 😔.. i tried that before.,
2nd Dec 2020, 1:58 PM
Mr.Kalyankumar
Mr.Kalyankumar - avatar
+ 1
Audio is playing, but it's not playing automatically... Im asking, how to make it to play automatically without clicking on play button... Bro😔
2nd Dec 2020, 2:02 PM
Mr.Kalyankumar
Mr.Kalyankumar - avatar
+ 1
This time I cant even audio☹️🥺😭, btw can u speak hindi?
2nd Dec 2020, 2:27 PM
Mr.Kalyankumar
Mr.Kalyankumar - avatar
+ 1
ᕙ(@°▽°@)ᕗ {inactive} yes bro it's working... Thank you 😊 soo much☺️☺️
2nd Dec 2020, 2:31 PM
Mr.Kalyankumar
Mr.Kalyankumar - avatar
+ 1
You can use loop is infinity your audio no stop
2nd Dec 2020, 4:56 PM
MOHAMMAD AZMAL ALI
MOHAMMAD AZMAL ALI - avatar
0
Mr.Kalyankumar Browsers doesn't allow to play an audio without any user gesture. You can do this with JavaScript So, in JavaScript you can't write audio.play() directly. You have to use an event to call it like mouse move, scroll, click, etc.
4th Dec 2020, 7:39 AM
Krish
Krish - avatar