Bug 39422

Summary: <audio> does not play mp3 file if it doesn't have an extension
Product: WebKit Reporter: Jaka Jančar <jaka>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WORKSFORME    
Severity: Normal CC: andy2013, eric.carlson, jaka, jer.noble
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.6   

Description Jaka Jančar 2010-05-20 05:53:03 PDT
new Audio('foo') doesn't work. If the file is renamed to foo.mp3, it does.

I've also tried using <source> and setting type to 'audio/mpeg', but it still doesn't work.
Comment 1 Andy Bajka 2015-02-08 07:50:23 PST
I can confirm this bug. It occurs in Safari OS X and iOS using the latest versions as of February 2015. Both Firefox and Chrome will play the .MP3 file even if the source file has no extension.

Example where "audio" is a valid .MP3 file.

<audio controls>
<source src="http://www.example.com/audio" type="audio/mpeg">
</audio>
Comment 2 Jer Noble 2015-02-08 15:22:27 PST
Jaka & Andy, what is the extensionless file being served as? I suspect that, in your example, it's being served as 'text/html'.

When I do the same experiment with a server configured to give the correct MIME type in the HTTP response, the content plays back as expected.