I have an annoying problem regarding the <audio> tag and FF/Chromium as media won't be played back when I would expect it to. Opera seems to handle it correctly.
We have audio media to be played back using the corresponding HTML5 <audio> tag. The <source> tag includes media in an audio-only OGG container. However, the file-extension ogg is not in the src-attribute, so src-links look like http://localhost:1234/a/b/cdefg/Xyz (Restful API using redirection to get the actual media file).
The following code is the part of the web page that should display the HTML5 player:
<div class="mainContent">
<audio id="aud1" height="360" width="640" autoplay="false" controls="controls" tabindex="0">
<source type="audio/ogg" src="http://localhost:1234/a/b/cdefg/Xyz"></source>
Your browser does not support HTML5.
</audio>
<div class="divider"></div>
<a class="homeLink" href="/index.html">Take me back to the Homepage</a>
</div>
The media being played back is definitely a audio-only OGG file.
I have tested this code on Ubuntu 10.04 FF5.0, Chromium 12.0.742.91 (87961) and Opera 11.50 with the following results:
- FF: doesn't play back
- Chromium: doesn't play back
- Opera: OK
I've integrated a small script to display different attributes of the HTMLMediaElement (attributes: networkState, readyState, see) yielding the following results:
- FF => networkState: NETWORK_LOADED (media source finished loading), readyState: HAVE_NOTHING (no media available for playback)
- Chromium => networkState: NETWORK_LOADED (media source finished loading), readyState: HAVE_NOTHING (no media available for playback)
- Opera => networkState: NETWORK_IDLE, readyState: HAVE_ENOUGH_DATA
(Note that the descriptions for the different states are from the Safari Dev site: http://developer.apple.com/library/safari/#documentation/AudioVideo/Reference/HTMLMediaElementClassReference/HTMLMediaElement/HTMLMediaElement.html)
If I insert a src which directly points to an audio-only OGG file (like http://en.wikipedia.org/wiki/File:Tromboon-sample.ogg), then it works as expected. It seems as if FF and Chromium seems to have issues with links not including the final file name?
Does anyone have an idea or hint about this?
Cheers, Chris