Web authors may be leaping to use the simple media embedding that HTML5 offers them: but there is a problem generated by the strictness of Microsoft’s Internet Explorer 9. It is particularly fussy, far more so than Google Chrome, about the mime-type of the media file.
As an example, a web page that includes this code:
<audio src="http://johnwarburton.net/aria.mp4" controls="true">
won’t play on Internet Explorer 9 when the file is served by an off-the-shelf Apache server running on Red Hat or Centos. The expected audio controls are replaced by a red cross. However, IE9 has the tools to analyse the problem (and, for that matter, so does Google Chrome, though the audio played first time). By pressing F12 and selecting the Console tab, one may query the Document Object Model for the error held by the audio object:
One may need to adjust the index following ‘audio’ if the tag in question is not the first <audio> tag on the page. The error codes returned mean this:
- MEDIA_ERR_ABORTED : 1
The fetching process for the media resource was aborted by the user.
- MEDIA_ERR_DECODE : 3
An error has occurred in the decoding of the media resource, after the resource was established to be usable.
- MEDIA_ERR_NETWORK : 2
A network error has caused the user agent to stop fetching the media resource, after the resource was established to be usable
- MEDIA_ERR_SRC_NOT_SUPPORTED : 4
The media resource specified by the ‘src’ parameter was not usable.
then restart the Apache server
service httpd restart
This cured the problem here.
Acknowledgement for this information is gladly given to the following blog from Microsoft: http://blogs.msdn.com/b/thebeebs/archive/2011/07/20/html5-video-not-working-in-ie9-some-tips-to-debug.aspx