Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

html <audio>

  • 3 replies
  • 1 has this problem
  • 8 views
  • Paskiausią atsakymą parašė jscher2000

more options

Can anyone tell me why the following html code doesn't work:

<audio autoplay>
  <source src="file.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>

I must say, it does work in Microsoft Edge, but in no other browser, including Firefox. And how could I make it work? I want the audio file to start playing when the page is opened, in the background, no controls, no loops...

Thanks in advance for any help.

Modified by cor-el

All Replies (3)

more options

According to w3schools it works on Firefox: https://www.w3schools.com/html/html5_audio.asp

Helpful?

more options

You can check the Web Console for media related messages.


Firefox can block autoplay by default, you can check the Autoplay setting for the current tab in "Tools -> Page Info -> Permissions".

Helpful?

more options

By default, audio does not auto-play on page load in Firefox. Another test:

https://www.jeffersonscher.com/temp/audio.html

Helpful?

Užduoti klausimą

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.