MP3音频无法在FireFox中播放

时间:2022-06-15 19:43:19

currently I am messing around with an embed player for my own site the code can be found below.

目前我正在为我自己的网站搞乱嵌入播放器,代码可以在下面找到。

<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>

Now with the snippet of code that is shown above, I am able to get my audio to play perfectly fine on a google browser how ever when you're using something such as FireFox and Waterfox (Not sure if it doesn't work on any others have not troubleshooted yet.) you can not hear the audio when hitting play.

现在有了上面显示的代码片段,我可以让我的音频在谷歌浏览器上播放得非常好,当你使用FireFox和Waterfox这样的东西时(不确定它是否适用于任何其他人还没有排除故障。)你在打比赛时听不到声音。

Can someone help me out in finding a solution to this? View the demo here

有人可以帮助我找到解决方案吗?在这里查看演示

1 个解决方案

#1


0  

If you open Firefox developer console, you will see the following error:

如果您打开Firefox开发人员控制台,您将看到以下错误:

HTTP "Content-Type" of "application/octet-stream" is not supported. Load of media resource http://lynxshare.com/mp3embed-2rlcsyplnse1.mp3 failed.

不支持“application / octet-stream”的HTTP“Content-Type”。媒体资源http://lynxshare.com/mp3embed-2rlcsyplnse1.mp3的加载失败。

The cotent type for mp3 files should be:

mp3文件的强效类型应该是:

Content-Type: audio/mpeg

I think the problem is in lynxshare web server configuration, so try uploading your files somewhere to another web server. I have downloaded your file and uploaded it to my server, try changing the URL from

我认为问题出在lynxshare web服务器配置中,所以尝试将文件上传到另一个Web服务器。我已下载您的文件并将其上传到我的服务器,尝试更改URL

http://lynxshare.com/mp3embed-2rlcsyplnse1.mp3

to

http://radio-tochka.com/radio/audio.mp3

My server gives proper content-type header and your player should work in Firefox.

我的服务器提供适当的内容类型标题,您的播放器应该在Firefox中工作。

#1


0  

If you open Firefox developer console, you will see the following error:

如果您打开Firefox开发人员控制台,您将看到以下错误:

HTTP "Content-Type" of "application/octet-stream" is not supported. Load of media resource http://lynxshare.com/mp3embed-2rlcsyplnse1.mp3 failed.

不支持“application / octet-stream”的HTTP“Content-Type”。媒体资源http://lynxshare.com/mp3embed-2rlcsyplnse1.mp3的加载失败。

The cotent type for mp3 files should be:

mp3文件的强效类型应该是:

Content-Type: audio/mpeg

I think the problem is in lynxshare web server configuration, so try uploading your files somewhere to another web server. I have downloaded your file and uploaded it to my server, try changing the URL from

我认为问题出在lynxshare web服务器配置中,所以尝试将文件上传到另一个Web服务器。我已下载您的文件并将其上传到我的服务器,尝试更改URL

http://lynxshare.com/mp3embed-2rlcsyplnse1.mp3

to

http://radio-tochka.com/radio/audio.mp3

My server gives proper content-type header and your player should work in Firefox.

我的服务器提供适当的内容类型标题,您的播放器应该在Firefox中工作。