1

I am using the following code to play an audio file from local drive.

I am not able to access the local drive path.

//for firefox
var a = '<object width="100" height="100" type="application/x-mplayer2" type="audio/wav" data="file:///C:\test.wma">';
//for ie
var a = '<embed src="file:///C:\test.wma" controller="true" autoplay="true" autostart="True" type="audio/wav" />';
unor
  • 92,415
  • 26
  • 211
  • 360
sree
  • 535
  • 4
  • 12
  • 26
  • To play audio with HTML5, you use the – Dan Goodspeed Oct 31 '13 at 08:36
  • Yes, u are correct.but – sree Oct 31 '13 at 09:49
  • It's confusing that you tagged it as HTML5, but it's not HTML5-related at all. My best guess to get the local URL path is to drag the file into the browser and see what it sets the URL as, or just use relative paths. – Dan Goodspeed Oct 31 '13 at 18:20

0 Answers0