Bug 39422
Summary: | <audio> does not play mp3 file if it doesn't have an extension | ||
---|---|---|---|
Product: | WebKit | Reporter: | Jaka Jančar <jaka> |
Component: | DOM | Assignee: | 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 |
Jaka Jančar
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.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Andy Bajka
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>
Jer Noble
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.