HTML5 video and audio element
You can use the HTML5 audio and video elements to play multimedia files streaming, without a separate plug-in.
Using JavaScript, the playback can be controlled with media events. The audio and video elements used as media elements inherit all the properties and methods of the HTMLMediaElement interface.
The main features of the audio and video elements with JavaScript include:
- Creating a player
- Controlling the playback
You can use the Play() and Pause() methods of the Media object to control playing and pausing media files. With media events, additional features can be used.
- Retrieving duration and play time
You can retrieve the duration and play time of the media file, if its metadata (such as playing time, duration, and video's width and height) is loaded.
- Playing from a random position
You can indicate the playback time by playing the media file from a random position. To do this, you must change the currentTime value of the Media object to trigger the timeupdate event.
- Retrieving progress state
You can retrieve and display the download progress state using the Progress media event, which is triggered when information related to the progress of a media object loading media contents is updated.
- Checking supported media formats
You can check whether the media data can be played using the canPlayType() method. Basically, the MIME type must be set in the Web server in a format that is supported in Tizen. If a non-supported MIME type is used, you can handle exceptions in advance.
Tizen supports the following media formats:
- Video: 3GP, AVI, ASF, OGV, MP4, MKV, WMV
- Audio: AAC, AMR, MP3, OGG, WAV, WMA
The following table lists the codecs supported in Tizen.
Table: Supported codecs Type Codec Encoder Decoder Video
MPEG-1
No
Yes
MPEG-4 part 2
Yes
Yes
MPEG-4 part 2 MS v1
No
Yes
MPEG-4 part 2 MS v2
Yes
Yes
MPEG-4 part 2 MS v3
Yes
Yes
H.264, H.263-1996, H.263+, H263-1998, H263 v2
Yes
Yes
H.264, MPEG-4 AVC, MPEG-4 part10
No
Yes
WMV3
No
Yes
VC1
No
Yes
THEORA
Yes
Yes
Audio
AAC
No
Yes
MP3
No
Yes
WMA (Available up to WMA8. WMA9 is not available.)
No
Yes
AMR-NB
Yes
Yes
AMR-WB
No
Yes
VORBIS
Yes
Yes