0

adding music from hard drive

how would one add music from their hard drive to html to place on a website or else where for that matter?

15th Sep 2016, 7:19 AM
Patrick Irby
Patrick Irby - avatar
4 Respuestas
+ 1
<audio controls> <source src="horse.ogg" type="audio/ogg"> <source src="horse.mp3" type="audio/mpeg"> Your browser does not support the audio tag. </audio> http://www.w3schools.com/tags/tag_audio.asp
15th Sep 2016, 8:16 AM
Nagendra Prajwal
Nagendra Prajwal - avatar
0
‪C:\Users\losts\Desktop\Pink Floyd - Discovery [Complete Studio Recordings][16-CD Box Set][FLAC] (2011)\1971 - Meddle\01 - One of These Days.flac how would i add that for example
16th Sep 2016, 4:05 AM
Patrick Irby
Patrick Irby - avatar
0
You can add by two ways. 1. Absolute path : "C:/~Folder/~filename" This is the complete path of the file you want to include. 2. Relative path : './~filename' or '../~filename' Notice the dot. Its relative path. Browser searches for the file within the .htm file stored directory for '.' (current folder) and its parent directory for '..' (parent folder) Example would look like this. <audio controls> <source src="./horse.mp3" type="audio/mpeg"> Your browser does not support the audio tag. </audio>
16th Sep 2016, 9:03 AM
Nagendra Prajwal
Nagendra Prajwal - avatar
0
see Patrick irby & anyone reading this if you want to add a song may be that song one of these days then first select that song and right click on it then go to properties then go to security and copy the object name of the song the name will be copied along with the path so next thing you have to do is just paste that name into your code For Example : I am showing you how i added a audio element using a file which i already have in my pc <audio controls> <source src="C:\Users\admin\Documents\HTML Programs\Aaja_Shaam_Hone_Aayi-Sitar ringtone.mp3" type="audio/mpeg"> <source src="C:\Users\admin\Documents\HTML Programs\Aaja_Shaam_Hone_Aayi-Sitar ringtone.ogg" type="audio/ogg"> </audio> in your case just the path will be different like ‪C:\Users\losts\Desktop\Pink Floyd and so on....
16th Sep 2016, 9:40 AM
Piyush Tambe
Piyush Tambe - avatar