0

I have HTML5 audio player. It works fine in Chrome, but on Internet Explorer I get "Error: Unsupported audio type or invalid file path".

<audio id="audio-player"  controls src="http://www.kris.basmaksym.online/wp-content/uploads/2021/03/file_example_MP3_2MG.mp3" type="audio/mpeg">
        Your browser does not support the 
        <code>audio</code> element.
    </audio>
rokky
  • 59
  • 6
  • Can this help? https://stackoverflow.com/questions/13312488/error-unsupported-audio-type-or-invalid-file-path-for-html5-audio-tag-in-inte – Deepak Mar 31 '21 at 11:41
  • most probably Internet Explorer doesnt support the audio – Jaysmito Mukherjee Mar 31 '21 at 11:42
  • I tried both mp3 and m4a formats. The same error – rokky Mar 31 '21 at 12:41
  • I test your code and it works well in my IE 11: https://i.stack.imgur.com/AAP0O.png. Which version of IE and OS are you using? Please check if you're running IE in **compatibility mode**. Please try to **disable all IE add-ons** and test again. You can also refer to [this doc](https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/samples/hh924821(v=vs.85)?redirectedfrom=MSDN), adding `` to the `` block of a webpage for testing. – Yu Zhou Apr 01 '21 at 03:04
  • @YuZhou it's very strange. I'm on Windows 10, IE 11. Turned on compatibility mode and added meta tag to ``. May the issue be related to using subdomain? I can add to compatibility view only root domain. – rokky Apr 01 '21 at 08:07
  • I mean turn off the compatibility mode. Besides, you can try to clear IE cache and test again. I also find some similar threads and you can refer to: [thread 1](https://stackoverflow.com/questions/16245435/ie10-windows7-audio-tag-never-plays-audio#16245496), [thread 2](https://stackoverflow.com/questions/22926844/html5-video-video-unsupported-invalid-file-type-ie). – Yu Zhou Apr 01 '21 at 08:59

0 Answers0