Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there,


I am trying to put an audio player in my page with dynamic source to the audio player.
<script>
var audio = new Audio();
audio.src = '../downloads/test.mp3';
audio.controls = true;
audio.autoplay = true;
<script>


everything works fine(IE9).
But when i host this site in IIS and Open in some other networked PC with IE9, when i click on play button, bothing will happen. In some PCs i get a black image with a red cross mark at the center when i click play.

But only in my pc it works fine.

Can any body help me??
Posted
Updated 11-Dec-13 18:43pm
v2
Comments
thatraja 12-Dec-13 5:48am    
Have you copied tha audio file to proper location(deployed location)?
Vikas Kottari 12-Dec-13 6:34am    
yes.....

1 solution

use ~ instead of .. in file path
 
Share this answer
 
Comments
enhzflep 17-Feb-15 1:23am    
Sure, this might work if you (1) assume that there does exist a folder:
home/someUserName/downloads/
And (2) assume linux.

Neither of these are reasonable assumptions to make, since (a) the site is confirmed as working in IE9 and (b) the site is reported as being hosted with IIS.

My 1.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900