2

I'm trying to share my music on my website, but I can't seem to get wavs to play in the browser. They're correctly served with audio/x-wav and I thought that was enough to get it to work. I tried disabling CSP and nosniff to no avail. This is what the response headers look like:

HTTP/1.1 200 OK
Strict-Transport-Security: max-age=15768000;
X-Content-Type-Options: nosniff
Content-Security-Policy: default-src 'none'; img-src 'self'; style-src 'self'; frame-ancestors *:*; base-uri 'none'; script-src 'self' 'unsafe-inline'; form-action 'none'
X-Frame-Options: ALLOWALL
X-XSS-Protection: 0
Referrer-Policy: strict-origin-when-cross-origin
Content-Type: audio/x-wav
Accept-Ranges: bytes
ETag: "1262751047"
Last-Modified: Sat, 07 Sep 2019 23:56:44 GMT
Content-Length: 2953260
Date: Sun, 08 Sep 2019 12:53:24 GMT
Server: lighttpd/1.4.45

I don't know if firefox just doesn't support wavs as it says it does. But I can't figure out how to fix this.

How do I tell firefox to allow in-browser playback?

migrated from serverfault.com Sep 8 at 17:09

This question came from our site for system and network administrators.

  • Does it play in other browsers? What is the HTML you served it with? – Michael Hampton Sep 8 at 17:11
  • 2
    Why not convert it to a supported format? At the very least, it'd save a lot of bandwidth - .wav is uncompressed, leaving even a short clip typically multi-megabytes in size. – ceejayoz Sep 8 at 17:25
  • 1
    @SoniEx2 MP3 is supported basically everywhere. caniuse.com/#feat=mp3 – ceejayoz Sep 8 at 17:41
  • 1
    Supported audio formats by browser. WAV should be supported by Firefox. developer.mozilla.org/en-US/docs/Web/HTML/… – Maximillian Laumeister Sep 8 at 19:46
  • 1
    @SoniEx2 Why are you hotlinking? Use the <audio> tag if you want to play in-browser. – ceejayoz Sep 8 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.