HTML5 audio/video support in Opera TV Store applications
Update history:
- Article updated on 30 March 2012 to suggest explicit
<source …>workaround. - Article updated on 18 April 2012 to include MPEG-1/MPEG-2 Audio Layer 3 audio codec for video and clarification on limitation of single
audio/videoelement playback on some of the current devices.
The Opera TV Store browser comes with built-in support for the HTML5 <audio> and <video>
elements, allowing developers to include multimedia content in their applications without any need for plugin-based solutions.
At its simplest, this means that multimedia elements can be included in a TV Store application by simply using markup such as:
<video src="/path/to/video.mp4"></video>
<audio src="/path/to/audio.mp3"></audio>
Due to limitations in how multimedia content is handled on certain current devices, there are situations in which the type of audio/video content being used is not automatically inferred by file extensions or MIME types. For this reason, we suggest to use the more explicit, though slightly more wordy, variant:
<video>
<source src="/path/to/video.mp4" type="video/mp4">
</video>
<audio>
<source src="/path/to/audio.mp3" type="audio/mp3">
</audio>
In contrast to the desktop version of Opera – where multimedia decoding and playback is handled directly by the browser) – the specifics of which codecs are supported on devices can vary considerably, as this depends on the underlying platform and integration work carried out by device manufacturers, as well as the specific version of the Opera TV Store that may be running on the device.
Additionally, due to the way some of the current devices have integrated audio and video support on their platform via an external media playback framework, it may not be possible to guarantee simultaneous playback of more than a single audio or video element.
At the time of publication, the following container formats and codecs are supported for Opera TV Store applications:
| Type | Media | MIME | Container | Video codec | Audio codec |
|---|---|---|---|---|---|
| Video | AVC | video/mp4 | MP4 | MPEG-4 AVC(H.264) Main and High Profiles Up to Level 4(inclusive) |
MPEG-1/MPEG-2 Audio Layer 3 Mono/Stereo 16-320kbps; SBR/VBR 32kHz/44.1kHz/48kHz |
| AAC-LC Mono/Stereo 16-320kbps; SBR/VBR 32kHz/44.1kHz/48kHz |
|||||
| HE-AAC Mono/Stereo 16-320kbps; SBR/VBR 32kHz/44.1kHz/48kHz |
|||||
| Audio | MP3 | audio/mp3 | MP3 | MPEG-1/MPEG-2 Audio Layer 3 Mono/Stereo 16-320kbps; SBR/VBR 32kHz/44.1kHz/48kHz |
|
| audio/mpeg | |||||
| AAC-LC | audio/mp4 | MP4 | AAC-LC Mono/Stereo 16-320kbps; SBR/VBR 32kHz/44.1kHz/48kHz |
||
| HE-AAC | audio/mp4 | MP4 | HE-AAC Mono/Stereo 16-320kbps; SBR/VBR 32kHz/44.1kHz/48kHz |
If you are testing your applications in the Opera TV Emulator, please note that – because of licensing reasons – the H.264 codecs are not installed by default. See the emulator's user guide for information of how to install these codecs separately.
About this article
| Published in | Dev.Opera |
|---|---|
| Date | February 10, 2012 |
| Author | Patrick H. Lauke |
| Tags | opera tv store, tv |
| Original | Internet Archive |