9

I (and about a million others) have found a bug in IE11 (not sure if other versions have the same bug) where, if you create an HTML5 audio tag, the browser reports "Invalid Source" no matter what. I've tried every combination I can think of with no luck. So far:

  • Changing the HTML end tags from self-closing to explicit
  • Changing the file name to eliminate any odd characters
  • Changing the audio sub format to every possible setting
  • Adding an explicit URI ("http:// ...")
  • Disabling all plugins (there were on the stock plugins)
  • Trying every possible audio format
  • Defining the MIME type
  • Changing the audio tag's parameters.
  • Changed the IIS settings to include the MIME types.

I have checked Microsoft's "Connect" website. They make the claim that it is not reproducible, but hundreds of thousands of Google results suggest otherwise.

Is this not possible at all? ALL other latest & greatest browsers I tried work (Firefox, Opera, Safari, Chrome). No solutions work.

Here's the code:

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="AudioPopupPlayer.aspx.vb" Inherits="AudioPopupPlayer" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
        <div style="padding-top: 30px; margin: auto; width: 300px;">
        <asp:Literal ID="litVoiceOver" runat="server"></asp:Literal></div>
</body>
</html>

Code behind:

Partial Class AudioPopupPlayer
Inherits System.Web.UI.Page

Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
    Dim VoiceOverFileName As String = Request.QueryString("vo")
    If VoiceOverFileName.Length > 0 Then
        Dim root As String = HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) + ResolveUrl("~/")
        Dim audiosource As String = "<audio id=""VoiceOver"" autoplay=""autoplay"" preload=""preload"" controls=""controls""><source src=""" & root & "audio/" & VoiceOverFileName & ".ogg"" type=""audio/ogg"" ></source><source src=""" & root & "audio/" & VoiceOverFileName & ".mp3"" type=""audio/mpeg"" ></source><source src=""" & root & "audio/" & VoiceOverFileName & ".wav"" type=""audio/wav"" ></source></audio>"
        Me.litVoiceOver.Text = audiosource
    End If
End Sub

 End Class

And, finally, a screenshot (in IE11) showing that the HTML is rendered perfectly, yet I still get the dreaded "Invalid Source" message (NOTE: copying and pasting the link causes the audio file to play - go figure).

bug in IE 11

6
  • Another note, I created a static HTML page and get the same result, so it's not that it is dynamically created. Just looking for a browser hack so I don't have to get involved with Flash.
    – MC9000
    Commented Jun 13, 2014 at 20:27
  • I have the same problem and am beyond frustrated. I have also tried every last thing everybody recommended. No dice. The fact that almost nobody on SO has much to say is not a good sign... Commented Aug 17, 2014 at 17:38
  • Update: In my case case it turned out that IE11 did not like the fact that I was specifying src urls with a query param at the end. I changed it to pass the parameter via headers and it actually works fine now. Commented Aug 21, 2014 at 16:47
  • @DaveMunger, I've tried to implement your suggestion about adding headers but can't get it working. How did you do this? Could you post a sample, please?
    – Scruff.R
    Commented May 16, 2016 at 7:48
  • @Scruff.R I just used simple custom header values. How you do that varies based on what language you're coding in, but a search for "custom headers [your language/platform here]" should get you started. Commented May 18, 2016 at 21:41

5 Answers 5

2

I had the same issue trying to use the simple HTML5 code. The url and file name were correct as well. This is what worked for me:

<audio src="song.mp3" controls autoplay></audio>

You can remove the controls if you don't need them, it's still going to work. I hope this helps!

1
  • Thanks a lot, I had this problem and this fixed it for me!
    – William
    Commented Jul 30, 2015 at 18:59
0

I tried a couple of new file formats. Internet Explorer 11 only supports the M4A audio format (WAV, OGG & MP3 are not supported). Microsoft really needs to put the correct information on their website about what their browser supports (they claim MP3 is supported, but clearly, it is not). Madness, I tell you!

4
  • Do you have another source confirming that IE11 does not support mp3? Commented Aug 17, 2014 at 17:39
  • Not off hand. - I created M4A files - works like a charm. Never could get mp3 to work in IE11 (it could still be a subformat that IE does not support - I tried every subformat in the MP3 spec with no luck). This is IE11 running on Windows 8.1 (could be an OS thing - I don't have time to test for MS's bugs)
    – MC9000
    Commented Aug 19, 2014 at 2:47
  • I actually did finally get it to work, myself. But my problem is that I was requesting src with a query param after the filename, for "signing" purposes (making the link available for a controlled amount of time). I did this instead with headers and now my audio/mp3 tags work fine with IE11. I have a feeling there might just be all sorts of persnickety issues with it that cause problems for people. Commented Aug 21, 2014 at 16:45
  • I've seen the headers changes (setting to tell IE to use compatibility mode), but it crashes jQuery 2.x controls. Too many catch-22's
    – MC9000
    Commented Aug 21, 2014 at 19:50
0

We have experienced the same issue in a corporate environment with fresh installs of IE11 and Windows 7.

We have resolved the issue by installing the K-Lite media pack and have an alternate MP3 codec installed. Then it worked.

0

A comment from here:

Posted by Jonathan Laughery on 23.5.2014 at 22:19 This is because IE's HTML5 audio tag doesn't support WAV PCM format. This is especially weird because IE does support WAV PCM in the deprecated bgsound tag, WAV PCM has been the native Microsoft Windows audio format forever, and Microsoft's is the only major browser that doesn't support it. WAVs are still popular in sound archives and used on corporate networks, but playing WAVs in IE requires the bgsound tag (IE-specific, deprecated, and poor control), transcoding on the server, or using a flash player (like jPlayer's fallback) which is what the HTML5 audio tag was designed to avoid. Please add this format.

Here's the documentation about bgsound . If you going to use bgsound this might be helpful

0

Check the browser's response headers for the audio file response. I ran into this issue due to a server not being configured to send the audio file as an audio/mpeg. Someone had mp3s set to application/octet-stream in IE. Once I fixed this, everything worked fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.