audio file not playing | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

audio file not playing

i have an audio. play() which gives an error "the element has no supported sources".. but i have defined audio. src="some file. mp3"... https://code.sololearn.com/WZgZLPS54E9q/?ref=app

24th Jan 2019, 1:59 PM
Ravindra Desai
Ravindra Desai - avatar
8 Answers
+ 3
You wanted to use the button? Like when you onlick the button, the audio will play.
24th Jan 2019, 2:48 PM
JTLZ
+ 2
Please show your code so we can help you.
24th Jan 2019, 2:02 PM
JTLZ
24th Jan 2019, 4:17 PM
JTLZ
+ 2
look at this code: https://code.sololearn.com/W8fkxqV2918V/?ref=app It’s working for me with my audio source. Maybe your audio source is incorrect.
24th Jan 2019, 4:25 PM
JTLZ
+ 1
🐲JTLZ 🐲 [#Never Give Up!] I've added the code..
24th Jan 2019, 2:41 PM
Ravindra Desai
Ravindra Desai - avatar
24th Jan 2019, 4:06 PM
Ravindra Desai
Ravindra Desai - avatar
0
🐲JTLZ 🐲 [#Never Give Up!] but it's giving an error saying "the element has no supported sources".. (the path defined is correct btw)
24th Jan 2019, 4:18 PM
Ravindra Desai
Ravindra Desai - avatar
0
🐲JTLZ 🐲 [#Never Give Up!] i don't understand!! I've done the same thing in my code... but its not working..
24th Jan 2019, 4:21 PM
Ravindra Desai
Ravindra Desai - avatar