How to.play audio present in your computer? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to.play audio present in your computer?

4th Mar 2016, 10:53 AM
Sulaman Khan Asakxai
Sulaman Khan Asakxai - avatar
4 Answers
+ 6
Create an audio element, with a source element inside. Then set the source element's value of src to the filepath or url of the audio file. Example: <audio controls> <source src="myfile.mp3" type="audio/mpeg" /> </audio> Note: Don't forget that source is a self closing tag.
4th Jun 2016, 6:56 AM
Gabe Rust
Gabe Rust - avatar
+ 4
you should put it in the same directory with your HTML document
20th Mar 2016, 6:49 AM
Vitkovskiy Danylo
Vitkovskiy Danylo - avatar
+ 4
Also you can extract your file path by press and hold left shift while pressing on your right button mouse then copy it's path and paste it on your HTML fils as usual...
28th May 2016, 5:06 PM
Alaa Sabbagh
Alaa Sabbagh - avatar
0
with the web audio API, you could manipulate sounds, loops, music synthesis and sound generation. it also comes with a set of predefined sound processing modules (reverb, delay, etc)
5th Aug 2016, 6:55 AM
Adeboye Adejuwon
Adeboye Adejuwon - avatar