Question

I'm playing an audio file with this code :

var snd = new Audio("sound.wav"); // buffers automatically when created
snd.play();

This was working well on every up-to-date well known browsers when I deployed my website (mid-2013).

However, today I've re-tested this functionality on IE11 and the sound hasn't been played. Opening the standard developper console on IE11 gives me this error :

MEDIA12899: AUDIO/VIDÉO : type MIME.

And it still works on Firefox 27.0.1

Thank you for your help.


EDIT 07/10/2014 :

Command:

$ file sound.wav

Outputs:

sound.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 44100 Hz

Command:

$ curl -I http://localhost/sound.wav

Outputs:

HTTP/1.1 200 OK
Date: Thu, 10 Jul 2014 13:15:48 GMT
Server: Apache
Last-Modified: Mon, 17 Mar 2014 14:38:26 GMT
ETag: "2de0e7e-52a5c-4f4ce5f4a7c80"
Accept-Ranges: bytes
Content-Length: 338524
Content-Type: audio/wav
Was it helpful?

Solution

I had the same problem and found that IE does not support wav format in audio or video HTML elements.

Found similar question answered in another post:

OTHER TIPS

Have you tried adding AddType audio/wav .wav to your .htaccess file to make sure it knows how to encode the file?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top