javascriptaudiomicrosoft-edgehtml5-audiomedia-source

MediaSource.isTypeSupported inconsistent result for mp3 on Microsoft Edge


I ran: MediaSource.isTypeSupported("audio/mp3") on the most recent Edge browser which returns false. This means that the user agent can not play this type according to MDN. However, when I drag a mp3 file into the browser window, it will play.

Have anyone an idea why that is?


Solution

  • The reason is that audio/mp3 isn't the correct type.

    You're looking for audio/mpeg instead.