upload audio in my code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

upload audio in my code

I try to upload a song on my code, so I cut and paste this code into my code. <audio src="audio.mp3" controls> Audio element not supported by your browser </audio> then I replace the audio.mp3 with my song, All Colors With One Wish.mp3. <audio src="Vi Nguyen-All Colors With One Wish.mp3" controls> Audio element not supported by your browser </audio> But it doesn't play my song. I try to upload a song from my computer.

14th Mar 2020, 7:07 AM
Vi Nguyen
Vi Nguyen - avatar
4 Answers
+ 4
Firstly upload your song to google drive or dropbox or any other cloud storages. Then use the link. See this if you are a dropbox user: https://code.sololearn.com/WW6t4B73kJVz/?ref=app
14th Mar 2020, 7:13 AM
NightFox
NightFox - avatar
+ 2
Vi Nguyen Go through the code I linked in my other answer.
14th Mar 2020, 7:38 AM
NightFox
NightFox - avatar
0
Are your files with html and mp3 in the same directory? If not, put them together. You can try to rename song without spaces, like "ViNguyenAllColorsWithOne.mp3", maybe it works.
14th Mar 2020, 7:18 AM
Kostia Gorbach
Kostia Gorbach - avatar
0
Do I have to upload my song on the website before I write my code? If so, how do I do that?
14th Mar 2020, 7:25 AM
Vi Nguyen
Vi Nguyen - avatar