media.eh
Basic media support. More...
Types
Functions
Description
Type details
A player of media data.
Function details
def get_supported_ctypes(): [String];
|
Returns list of all supported content types.
def play_tone(note: Int, duration: Int, volume: Int);
|
Plays a specified tone.
A
note is in the range 0..127.
A
volume is in the range 0..100.
A
duration is given in milliseconds and must be positive.
This function is non-blocking, it returns immediately and note
is played back in the background.
Creates new player with given data source and content type.
def Player.get_ctype(): String;
|
Returns the content type of the media that is being played back by this player.
def Player.set_loops(count: Int);
|
Sets the number of times the player will loop and play the content.
By default, the media is played once. If loop count is set to -1, content will
be played indefinitely.
def Player.get_duration(): Long;
|
Returns the duration of the media in milliseconds.
def Player.get_time(): Long;
|
Returns current position of the media in milliseconds.
If current position is unknown, the function returns -1.
def Player.set_time(time: Long);
|
Sets current position in the media to play from.
For some content types may be not very accurate. There are media types
that cannot support the setting of media time, for these types,
ERR_MEDIA error is raised.
Starts playback of this player.
If player was stopped previously, playback is resumed from where it
was previously stopped. If the player has reached the end of media,
calling start() will automatically start the playback from the
beginning of the media.
Pauses playback at the current media time.
Closes this player and releases its resources.
Calling this method will also close associated input stream.