[英]MP3 audio not playing in FireFox
目前,我正在为自己的网站搞一个嵌入式播放器,代码可以在下面找到。
<script type="text/javascript">
$(document).ready(function() {
$("#player4").flatie({
media: {
mp3: "http://lynxshare.com/mp3embed-2rlcsyplnse1.mp3"
},
swfPath: "http://www.wubstub.com/embed/js/Jplayer.swf"
});
});
</script>
</head>
<body>
<div id="player4" class="jPlayer audioPlayer light"></div>
<div class="test"></div>
<div class="jp-no-solution" style="display: none;">
<span>Update Required</span>
To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
</div>
现在有了上面显示的代码片段,无论何时使用FireFox和Waterfox之类的东西,我都能使我的音频在google浏览器上完美播放(不确定它是否不能在任何其他尚未进行故障排除。)您在打游戏时听不到声音。
有人可以帮我找到解决方案吗? 在此处查看演示
如果打开Firefox开发者控制台,将看到以下错误:
不支持“应用程序/八位字节流”的HTTP“内容类型”。 加载媒体资源http://lynxshare.com/mp3embed-2rlcsyplnse1.mp3失败。
mp3文件的内容类型应为:
内容类型:音频/ mpeg
我认为问题出在lynxshare Web服务器配置中,因此请尝试将文件上传到其他Web服务器。 我已经下载了文件并将其上传到我的服务器,请尝试从
至
我的服务器提供了正确的内容类型标题,并且您的播放器应在Firefox中工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.