2

Im making a music player using HTML, jQuery and XML. The XML file contains the names of all the songs with their paths. I can't access the XML file locally because Chrome doesn't allow that, so I tried running it on localhost, but localhost doesn't let me play the mp3!

I opened the mp3 file on localhost (localhost/Yash/song.mp3) but it doesn't play the music.

Please help me find a solution to this. enter image description here

Yash
  • 29
  • 7
  • Why does chrome not let you view local XML files? It works for me. When you say it's not playing the music do you mean it has found the file but the player doesn't play it? – Lennart Jul 06 '13 at 10:45
  • It lets me view the XML files, but it doesn't allow me to use $.get or $.ajax to access them using jQuery. Yes it finds the file but doesn't play – Yash Jul 06 '13 at 10:51
  • It may help to see the jQuery code then, there shouldn't be any problem there except for permission issues. Do the files have the right permissions? – Lennart Jul 06 '13 at 11:23

1 Answers1

0

Maybe you should use one of these

http://localhost/Yash/song.mp3
http://127.0.0.1/Yash/song.mp3
/Yash/song.mp3 

as path?

Pieter
  • 1,823
  • 1
  • 12
  • 16