为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Only Firefox browser won't play sounds

more options

Only Firefox Browser 100.0.1 (64-bit) and (32-bit) won't respond to HTML <audio> Tag in a webpage. I have 4 computers (tower, laptops and tablet) using Windows 7 or Windows 10 though Firefox won't play <audio> tag sounds on any of them. All computers are also running Chrome (Version 101.0.4951.67 (Official Build) (64-bit)) and Internet Explorer (Ver: 20H2 OS Build 19042.1706) and those browsers play the <audio> Tag just fine. Note: videos from YouTube play video & audio as well as .mp3 files just fine in Firefox. Volume Mixer for Firefox is set to 50%, no mute. All other applications in Volume Mixer are set the same. I also deleted browsing history, cookies, Cash, Forms, Offline website data & search history as well as Site settings. Range to clear 'Today'. And, Firefox still won't respond to the <audio> tag. Also, restarted the computer and uninstalled Firefox and re-installed it, no change. w3schools.com indicates Firefox first supported the <audio> tag in version 3.5. Coding on webpage is: (javascript) $document.onkeyup(function(i){if(i.keyCode==37){document.getElementById('audio').play();}else{if (e.keyCode == 39){document.getElementById('audio').play();}}}) HTML coding is: <audio id="audio" controls style="display:none"> <source src="https://www.b*******.mp3" type="audio/mpeg"> Your browser does not support the audio element.</audio>. I also tried including <code>audio</code> element. just before the </audio> closing tag though no change. Thoughts?

Only Firefox Browser 100.0.1 (64-bit) and (32-bit) won't respond to HTML <audio> Tag in a webpage. I have 4 computers (tower, laptops and tablet) using Windows 7 or Windows 10 though Firefox won't play <audio> tag sounds on any of them. All computers are also running Chrome (Version 101.0.4951.67 (Official Build) (64-bit)) and Internet Explorer (Ver: 20H2 OS Build 19042.1706) and those browsers play the <audio> Tag just fine. Note: videos from YouTube play video & audio as well as .mp3 files just fine in Firefox. Volume Mixer for Firefox is set to 50%, no mute. All other applications in Volume Mixer are set the same. I also deleted browsing history, cookies, Cash, Forms, Offline website data & search history as well as Site settings. Range to clear 'Today'. And, Firefox still won't respond to the <audio> tag. Also, restarted the computer and uninstalled Firefox and re-installed it, no change. w3schools.com indicates Firefox first supported the &lt;audio&gt; tag in version 3.5. Coding on webpage is: (javascript) $document.onkeyup(function(i){if(i.keyCode==37){document.getElementById('audio').play();}else{if (e.keyCode == 39){document.getElementById('audio').play();}}}) HTML coding is: &lt;audio id="audio" controls style="display:none"&gt; &lt;source src="https://www.b*******.mp3" type="audio/mpeg"&gt; Your browser does not support the audio element.&lt;/audio&gt;. I also tried including &lt;code&gt;audio&lt;/code&gt; element. just before the &lt;/audio&gt; closing tag though no change. Thoughts?

由cor-el于修改

所有回复 (1)

more options

Unfortunately, putting a space at the beginning of a line causes this site to treat it as preformatted text and not wrap the lines. There should be an Edit option next to your post in the Question Tools section. https://support.mozilla.org/questions/1377284

Could you try this test page and see which, if any, of the formats play on your Firefox:

http://hpr.dogphilosophy.net/test/

In your example, you have: style="display:none" on your tag. In other words, you are creating an invisible player. The autoplay blocker, or another feature, might pause or ignore invisible players.