new Audio() not Implemented in Internet explorer
Asked Answered
M

2

6

I am trying to play an array of mp3 sound. I have an audio file in my html and get it using document.CreateElement() in my JavaScript.

When I try to set the src attribute (setAttribute("src", string)) I get an error in IE saying "Not Implemented".

I tried using the new Audio(), I get the same error in IE, "Not Implemented". Both approaches works in Google chrome and Firefox.

Can anyone help?

<audio id="audio1" >Not supported</audio>
audioElm = document.getElementById("audio1");
audioElm.setAttribute("src", aud[count]); 
audioElm.play();
Maze answered 5/5, 2015 at 19:43 Comment(6)
may you show the code?, pleaseBoethius
HTML <audio id="audio1" >Not supported</audio> JS audioElm = document.getElementById("audio1"); audioElm.setAttribute("src", aud[count]); audioElm.play(); This works with Chrome and FF but not for IE. when I debug It says NOT IMPLEMENTEDMaze
What is the format of the audio file? IE only supports .mp3.Honesty
MP3. and it is not workingMaze
IE supports mp3 and aac audio files, so it is probably not a file type issue.Figueroa
What do aud[] and count contain at the time you use them?Folks
F
8

HTML5 Audio not playing in IE (recent versions)?

It could be a compatibility view issue (quirks mode)

  • is your site on the compatibility view list in IE?
  • or is your page embedded in an iframe?

It could be caused by running IE on a server

  • IE server versions don't support audio/video (enhanced protected mode)

It could be caused by running IE on a Windows 8.1 Enterprise version such as "8.1 N".

  • The fix for this would be installing the Media Feature Pack for N and KN versions of Windows 8.1

Also you can go to html5test.com and look in the audio section at the "MP3 support".

Figueroa answered 6/5, 2015 at 7:39 Comment(1)
+1 for the IE server version not supporting audio/video. That was the answer that I was looking for, thank you.Nightjar
T
0

I was working in a windows server and I had the same problem playing MP3 audios in internet explorer.

The only solution I found was installing the "Desktop Experience Feature" in my server.

Start -> Search for "Server manager" -> Features -> Add features -> Select "Desktop experience" -> Next and Install

Once installation is completed, you need to restart the computer and then the feature gets enabled.

Trichinosis answered 5/9, 2019 at 7:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.