The <audio> tag does not work in IE11

I am trying to do a simple audio test in html5 (Windows 7) and it works in Firefox and Chrome, but not in IE11. Can anybody help me? This is my simple HTML file:

<!DOCTYPE html>
<html>
    <head>
        <title>My Title</title>
    </head>

    <body>
        <audio controls>
            <source src="myAudioFile.mp3" type="audio/mp3"/>
        </audio>
    </body>
</html>

I read all the related questions, but my problem is not resolved. Also, I tried adding this, but still no luck:

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

I always get the message "invalid source" and I do not know what else I can do.

+4
source share
4 answers

, IE11 " -" , - . , , HTML5. MS . , , , . , , :

Open Internet Explorer, click the Tools button,
Click Internet Options. Tap or click the Advanced tab
Under Multimedia, select Play sounds in webpage.
Click Apply, OK. Now check if you can play the mp3 files.

, . IE .

+4

The type of source looks like it might be wrong. Try the following:

<audio controls>
    <source src="myAudioFile.mp3" type="audio/mpeg"/>
</audio>
+1
source

For a while, the html5 HTML tag does not work without controls or clears its chats and tries to execute the code below if any problem answers. Hope you have a problem. A good day

<!DOCTYPE html>
  <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Audio Tag</title>
    </head>
    <body>
        <!--Before HTML5, Developer can add audio tag by Plug-in like  FLASH. But HTML5 introduces an audio tag for embedded an audio media in a web page**strong text**-->

       <audio controls="controls">
          <source src="Allegro%20from%20Duet%20in%20C%20Major.mp3" type="audio/mp3">

        </audio>
    </body>
  </html>
0
source

Source: https://habr.com/ru/post/1624366/


All Articles