+ 2

I am not getting how to add audio in html5 from the android phone.Can anyone help me?

I tried many times but i can't add the audio in html5

11th Apr 2020, 1:34 PM
<k>Kartik</k>
27 Respostas
+ 3
kartik dhingra if you want to play your audio file from your phone here on slololearn the audio must be hosted online, Options: 1 either you browse the audio file on google, and copy the url an paste in your code here. 2: download Dropbox app, tap on the audio share option on your phone, and select with dropbox after the upload is completed navigate to the file on dropbox and copy the url and paste in your code. But the code you wrote will only work on your PC and not on sololearn
13th Apr 2020, 12:12 PM
ugochukwu Joseph
ugochukwu Joseph - avatar
+ 4
<audio controls> <source src="audio.mp3" type="audio/mpeg"> <source src="audio.ogg" type="audio/ogg"> </audio>
11th Apr 2020, 1:43 PM
Mr. Mohsen Akbarzadeh
Mr. Mohsen Akbarzadeh - avatar
+ 3
In phone, go to your audio. Then tap on that audio and hold, show you options, then go to properties or more, then go to details, search for locations, then tap and hold on locations, select all and copy, then paste in your code
11th Apr 2020, 2:54 PM
Mr. Mohsen Akbarzadeh
Mr. Mohsen Akbarzadeh - avatar
+ 3
Var audio= new Audio("file name") ; Audio. Play() ; // in js
12th Apr 2020, 3:46 AM
Reshma
Reshma - avatar
+ 2
Change audio name with your audio file name, and there is two type of audio extension file in this code if you dont need second one you can delete it
11th Apr 2020, 1:45 PM
Mr. Mohsen Akbarzadeh
Mr. Mohsen Akbarzadeh - avatar
+ 2
Your code is ok i think. But I'm pretty sure that your audio link is wrong
11th Apr 2020, 2:35 PM
Mr. Mohsen Akbarzadeh
Mr. Mohsen Akbarzadeh - avatar
+ 2
Do you using phone for code?
11th Apr 2020, 2:50 PM
Mr. Mohsen Akbarzadeh
Mr. Mohsen Akbarzadeh - avatar
+ 2
In laptop or pc, go to your audio folder, right click on audio and choice properties, then search for locations, then with mouse select location address and copy in your code
11th Apr 2020, 2:55 PM
Mr. Mohsen Akbarzadeh
Mr. Mohsen Akbarzadeh - avatar
+ 2
Yes you can do this but you need to keep it in your mind that same folder names and file names you should copy and paste for your file or code dont work
11th Apr 2020, 4:46 PM
Mr. Mohsen Akbarzadeh
Mr. Mohsen Akbarzadeh - avatar
+ 2
He said in html5.
12th Apr 2020, 4:05 AM
Mr. Mohsen Akbarzadeh
Mr. Mohsen Akbarzadeh - avatar
13th Apr 2020, 7:28 AM
narayanaprasad
narayanaprasad - avatar
+ 1
Send here your code
11th Apr 2020, 2:19 PM
Mr. Mohsen Akbarzadeh
Mr. Mohsen Akbarzadeh - avatar
+ 1
Ok just a minute
11th Apr 2020, 2:20 PM
<k>Kartik</k>
11th Apr 2020, 2:24 PM
<k>Kartik</k>
+ 1
I am confused in that only. Can you guide me how to get audio link in my file manager
11th Apr 2020, 2:40 PM
<k>Kartik</k>
+ 1
Yes
11th Apr 2020, 2:51 PM
<k>Kartik</k>
+ 1
I tried in laptop also
11th Apr 2020, 2:51 PM
<k>Kartik</k>
+ 1
<audio control> <source src="file.name" type="audio/mpeg"> </audio>...if not working then ur browser is not supporting this audio tag
12th Apr 2020, 1:23 PM
Reshma
Reshma - avatar
+ 1
<audio></audio>
12th Apr 2020, 2:04 PM
Akash Walke
Akash Walke - avatar
+ 1
Try it ,if it is the right location or just download dropbox ,upload audio on it and copy the link to paste it in your file
12th Apr 2020, 8:58 PM
Abhay
Abhay - avatar