I can't play .mp3 files on localhost

最后都变了- 提交于 2019-12-12 19:13:12

问题


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.


回答1:


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?



来源:https://stackoverflow.com/questions/17502109/i-cant-play-mp3-files-on-localhost

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!