Reputation: 29
How to play local audio file (c:\classical\chopin.wav - no file selection) in Google Chrome using HTML5 coding?
Upvotes: 0
Views: 1526
Reputation: 582
Keep your audio file in html folder and this code will work.
<audio controls>
<source src="chopin.wav" type="audio/wav">
Your browser does not support the audio element.
</audio>
Upvotes: 0
Reputation: 570
I'm not on a Windows machine right now. But you should try
<audio src="file:///C:/classical/chopin.wav" controls ></audio>
Of course, this only works, if the webpage is viewed locally on your machine.
Upvotes: 1