+ 9

How can I add a music to a web page?

29th Jul 2020, 4:55 AM
Istiaq Ahmed Nabil
Istiaq Ahmed Nabil - avatar
25 odpowiedzi
29th Jul 2020, 5:22 AM
Calviղ
Calviղ - avatar
+ 7
https://www.sololearn.com/discuss/1054246/?ref=app
29th Jul 2020, 5:10 AM
Nilesh
Nilesh - avatar
+ 7
Nabil not ".src", it's "src" space between string and controls attribute
29th Jul 2020, 5:20 AM
Calviղ
Calviղ - avatar
+ 6
Use <audio> tag.
31st Jul 2020, 3:51 AM
Sakshi💕
Sakshi💕 - avatar
+ 5
It works.thanks buddy
29th Jul 2020, 5:31 AM
Istiaq Ahmed Nabil
Istiaq Ahmed Nabil - avatar
+ 4
Can I insert a music from my Dropbox?
29th Jul 2020, 5:00 AM
Istiaq Ahmed Nabil
Istiaq Ahmed Nabil - avatar
29th Jul 2020, 5:00 AM
Mantafounis Panagiotis
Mantafounis Panagiotis - avatar
+ 4
Thanks buddy
29th Jul 2020, 5:05 AM
Istiaq Ahmed Nabil
Istiaq Ahmed Nabil - avatar
+ 4
<!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <audio .src="https://dl.dropbox.com/s/8xrst3jec5h75zt/Alan_Walker_-_All_Falls_Down_%28feat._Noah_Cyrus_with_Digital_Farm_Animals%29%28128k%29.mp3?raw=1"controls></audio> </body> </html>
29th Jul 2020, 5:14 AM
Istiaq Ahmed Nabil
Istiaq Ahmed Nabil - avatar
+ 3
Wire the programme and add the <audio. src = "..... > </audio>
29th Jul 2020, 7:36 AM
Desh M. Vid.↗
Desh M. Vid.↗ - avatar
+ 3
<audio src="sample.mp3" type="audio/mpeg"> </audio> Or <source src="sample.mp3" type="audio/mpeg"> </source>
29th Jul 2020, 1:11 PM
Aman Shaikh
Aman Shaikh - avatar
+ 3
Yes by using the audio tag e.g <audio controls autoplay loop> <source src="audiofile.mp3" type="audio/mpeg"> </audio>. The "audiofile.mp3" is the source of audio file you want to put in your webpage, controls display the control for the user, autoplay and loop not neccessary, autoplay starts playing the audio without the user's permission and loop continues playing the audio from the start even though it has ended.
29th Jul 2020, 5:06 PM
Uyi Oduware
Uyi Oduware - avatar
+ 3
Wire the programme and add the <audio. src = "..... > </audio>
30th Jul 2020, 11:16 AM
Samuel Darkwa Nimo
Samuel Darkwa Nimo - avatar
+ 3
Music is audio so use <audio> tag
30th Jul 2020, 2:19 PM
Magala Reuben
Magala Reuben - avatar
+ 3
You want to add music to web using JS, then definitely check this out : https://stackoverflow.com/questions/9419263/playing-audio-with-javascript
30th Jul 2020, 2:46 PM
Roopesh
Roopesh - avatar
+ 2
https://code.sololearn.com/WBf5zovmh1he/?ref=app
29th Jul 2020, 5:04 AM
Calviղ
Calviղ - avatar
+ 2
But why does it isn't working?
29th Jul 2020, 5:13 AM
Istiaq Ahmed Nabil
Istiaq Ahmed Nabil - avatar
29th Jul 2020, 4:35 PM
Dark
Dark - avatar
+ 2
You should use html 5 element audio tag <audio src="sample.mp3" type="audio/mpeg"></audio>
29th Jul 2020, 6:28 PM
Nihal Prasad
Nihal Prasad - avatar