HTML5 Audio Test of Browser Dependence on Media Filename
This pair of tests was designed to determine whether browsers rely at all on filename extension to determine media type of HTML5 audio source files, and whether GET parameters included in the URL effect browsers' ability to detect media type. Both of these issues are relevant since various tools and techniques are available for encrypting URLs to make them more secure.
Test #1: Filename Extensions
In this test, the <audio> element includes source files in mp3 and ogg, but neither file is named with those extensions (they use .mxx and .oxx instead).
NOTE: I also added audio/ogg and audio/mpeg MIME types for oxx and mxx extensions in the .htaccess file on my server. So I'm reasonably confident that when the server is asked to serve up an oxx or mxx file, it does so with the appropriate header.
Results
Most recent test: November 30, 2011
Opera 11 and Google Chrome 11 work fine. They are not dependent on file name. Chrome plays the .mxx file, and Opera skips that file and plays the .oxx file.
Firefox can not play the .oxx file. Versions 4.0.1, 5.0, 6.0, 7.0, and 8.0.1 were tested. It seems to think it can play the file, and correctly loads the duration of the media and shows the default player controls, but it isn't actually able to play the file.
Safari is unable to play the .mxx file. This is true in all the latest versions of Safari, on Windows, Mac, iPhone and iPad. Tested through 5.1.
IE9 needs to recognize all file names. Even if the first source is .mp3 (which it's capable of playing), it won't even play that if it doesn't recognize the second source.
Test #2: Parameters in URL
In this test, the <audio> element includes source files in mp3 and ogg, and both have those extensions, but both also have GET parameters in their URL.
Results
Most recent test: November 30, 2011
IE 9.0.8112.16421 works fine (tested November 30, 2011). In a previous test on June 25, 2011, IE9 did not play this file (unfortunately I didn't record the specific version of IE9).
Opera 11 and Google Chrome 11 work fine. The parameters in the file names do not effect their ability to recognize them.
Firefox works fine. Versions 4.0.1 and 5.0 were tested.
Safari works fine. This is true in all the latest versions of Safari, on Windows, Mac, iPhone and iPad.
Conclusion: All current browsers are smart enough to avoid being tripped up by parameters in the URL.
Test #3: Amazon S3 URL
This test uses Amazon S3 URLs that were known to be working at the time of the test. These are dynamically-generated URLs that expire after 40 minutes, so as you're viewing this page now they probably don't work. However, they were tested during the 40-minute window, so any failure is not due to the time having expired.
Results
Most recent test: June 25, 2011
Opera 11 works fine.
Google Chrome 11 does not play the file.
Firefox is intermittent. In one test, both versions 4.0.1 and 5.0 played the file. However, on subsequent tests they were unable to play the file. Clearing the cache had no effect.