BoffinBrain
BoffinBrain

Reputation: 6525

Firefox HTML5 Audio: Media resource could not be decoded (OnMediaSinkAudioError)

This issue is related to playing media in Firefox. While trying to stream audio after moving workstations, I get the following error in the console:

Media resource [...] could not be decoded [...] NS_ERROR_DOM_MEDIA_MEDIASINK_ERR (0x806e000b) Details: OnMediaSinkAudioError

In this case, it's not down to the website setup or contents of the audio stream, as they were working before.

Searching online for OnMediaSinkAudioError or NS_ERROR_DOM_MEDIA_MEDIASINK_ERR only seem to turn up with code commits or repositories for Firefox itself, so this doesn't appear to be a common problem.

Upvotes: 10

Views: 23897

Answers (4)

Jamshaid K.
Jamshaid K.

Reputation: 4547

I was receiving the similar error (Media Resource xxx could not be decoded.) in Firefox 46.0.1 and it turns out, the browser does not support .wav files, it worked fine with mp3 audio files.

I had to use embed element with type="application/x-mplayer2" which triggered vlc component to play the file. We were okay with this work around as we only use this website internally and had to stick to older version of Firefox for some reasons.

Though, the audio wav files worked fine in Google Chrome and Mozilla Firefox latest versions.

Upvotes: 1

Kunal Saraf
Kunal Saraf

Reputation: 73

If you are using VS CODE Live Server extension, Javascript Audio() won't play sound. Try running the site without the extension.

Upvotes: 2

Lomanic
Lomanic

Reputation: 371

I had the same problem more than once, this time after showing the Console (on Soundcloud) I saw the NS_ERROR_DOM_MEDIA_MEDIASINK_ERR error logged and googled it to find this SO question. What fixed this issue for me was the 1st solution at drivereasy (restarting the Windows Audio service), without even restarting Windows or Firefox.

  1. Hold Down Windows logo and press R key. A Run dialog box will pop up.
  2. Type services.msc in the run box and click OK button.
  3. In right Services Window, find Windows Audio from the “Name” list and right-click on it. Click Restart in the pop-up menu. Then the audio service will restart.

A cmd oneliner would be net stop AudioSrv && net start AudioSrv, run as Administrator.

Upvotes: 9

BoffinBrain
BoffinBrain

Reputation: 6525

It turns out that in this scenario, the error is quite misleading, since it is caused by a misconfiguration of the Windows audio output device.

After swapping my headphones from the rear audio ports to the front and restarting the workstation, everything worked fine. Restarting Firefox may have also been sufficient.

Upvotes: 11

Related Questions