我无法在localhost上播放.mp3文件 [英] I can't play .mp3 files on localhost
本文介绍了我无法在localhost上播放.mp3文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用HTML,jQuery和XML制作音乐播放器. XML文件包含所有歌曲的名称及其路径.我无法在本地访问XML文件,因为Chrome不允许这样做,因此我尝试在localhost上运行它,但是localhost不允许我播放mp3!
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!
我在localhost(localhost/Yash/song.mp3)上打开了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.
推荐答案
也许您应该使用其中之一
Maybe you should use one of these
http://localhost/Yash/song.mp3
http://127.0.0.1/Yash/song.mp3
/Yash/song.mp3
作为路径?
这篇关于我无法在localhost上播放.mp3文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文