I have an annoying problem regarding the <audio> tag and the FF / Chromium, as the media will not play when I expected it. Opera seems to work correctly.
We have sound media for playback using the corresponding HTML5 <audio> tag. The <source> tag contains media in an OGG container for audio only. However, the ogg file extension 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 part of the webpage on which the HTML5 player should be displayed:
<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>
Playable media is, of course, an OGG file that only supports audio.
I tested this code on Ubuntu 10.04 FF5.0, Chromium 12.0.742.91 (87961) and Opera 11.50 with the following results:
- FF: not playing
- Chromium: not playable
- Opera: OK
I included a small script to display various HTMLMediaElement attributes (attributes: networkState, readyState, see), giving the following results:
- FF => networkState: NETWORK_LOADED (bootstrap media source), readyState: HAVE_NOTHING (media not available for playback)
- Chromium => networkState: NETWORK_LOADED (bootstrap media source), readyState: HAVE_NOTHING (no media available for playback)
- Opera => networkState: NETWORK_IDLE, readyState: HAVE_ENOUGH_DATA
(Note that descriptions for different states are on the Safari Dev website: http://developer.apple.com/library/safari/#documentation/AudioVideo/Reference/HTMLMediaElementClassReference/HTMLMediaElement/HTMLMediaElement.html )
If I insert src, which directly points to only an OGG file for audio only (e.g. http://en.wikipedia.org/wiki/File:Tromboon-sample.ogg ), then it works as expected. Does FF and Chromium seem to be having link problems, not including the final file name?
Does anyone have an idea or a hint of this?
Cheers, Chris