How to put an audio in a form.? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How to put an audio in a form.?

I tried making a new folder but it didn't work...what else can be done for an audio to get played excluding bgsound,embed and audio.

13th Jan 2017, 2:17 AM
Maria Philip
Maria Philip - avatar
15 Answers
+ 6
<audio src="1.mp3">Your browser does not support audio tag</audio> This works if your HTML file is on the same path as your .mp3 file.
13th Jan 2017, 2:58 AM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 4
if you have a audio in folder "audio" named audio.mp3 taking the HTML file as base path use SRC="audio/audio.mp3" for python DTL <audio SRC={℅static 'audio/audio.mp3'%}>
13th Jan 2017, 5:06 AM
Sun
Sun - avatar
+ 4
as a last resort ...try JavaScript play function . w3school.org
15th Jan 2017, 5:26 PM
Sun
Sun - avatar
+ 4
not so sure as I do these on PC
15th Jan 2017, 5:28 PM
Sun
Sun - avatar
+ 4
Check whether your .mp3 file is in the same path as your .html file. If there is no output, try <audio src="1.mp3" controls>Your browser doesn't support audio tag.</audio>.
15th Jan 2017, 5:41 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 4
does android browsers supports audio tag ? ....u need webgl for that correct cheese
15th Jan 2017, 5:43 PM
Sun
Sun - avatar
+ 4
I tried it in anWriter and the music player is showing.
15th Jan 2017, 5:48 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 3
Oh OP says "apply this to my phone". Sorry I just read the posts at the bottom. But OP is saying there is no output, if it is not supported, the text will be seen.
15th Jan 2017, 5:46 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 3
you have to show codes for us to help .
15th Jan 2017, 5:47 PM
Sun
Sun - avatar
+ 3
maybe she is writing the codes in side another elements
15th Jan 2017, 5:50 PM
Sun
Sun - avatar
+ 3
Yup, tried it on chrome and it works like expected. OP said there is no output because there is no "controls" inside the audio tag so the music player couldn't be seen and autoplay=false. <audio src="123.mp3" controls></audio>
15th Jan 2017, 5:50 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
0
Ohkay! thank you I'll try
13th Jan 2017, 5:29 AM
Maria Philip
Maria Philip - avatar
0
I tried all the methods but I am not getting any output..
15th Jan 2017, 5:25 PM
Maria Philip
Maria Philip - avatar
0
I can apply all this on my phone,right?
15th Jan 2017, 5:27 PM
Maria Philip
Maria Philip - avatar
0
pman
16th Jan 2017, 11:35 AM
PARTHA MANDAL
PARTHA MANDAL - avatar