forked from enlightenment/efl
96 lines
3.2 KiB
Plaintext
96 lines
3.2 KiB
Plaintext
interface Efl.Player
|
|
{
|
|
[[Efl media player interface
|
|
|
|
@since 1.23
|
|
]]
|
|
c_prefix: efl_player;
|
|
methods {
|
|
@property playing {
|
|
[[Playback state of the media file.
|
|
|
|
This property sets the playback state of the object. Re-setting the current
|
|
playback state has no effect.
|
|
|
|
If set to $false, the object's @.playback_progress property is, by default, reset to $[0.0]. A
|
|
class may alter this behavior, and it will be stated in the documentation for a class
|
|
if such behavior changes should be expected.
|
|
|
|
Applying the $false playing state also has the same effect as the player object reaching
|
|
the end of its playback, which may invoke additional behavior based on a class's
|
|
implementation.
|
|
]]
|
|
set {
|
|
return: bool(false); [[If $true, the property change has succeeded.]]
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
playing: bool; [[$true if playing, $false otherwise.]]
|
|
}
|
|
}
|
|
@property paused {
|
|
[[Pause state of the media file.
|
|
|
|
This property sets the pause state of the media. Re-setting the current
|
|
pause state has no effect.
|
|
|
|
If @.playing is set to $true, this property can be used to pause and resume
|
|
playback of the media without changing its @.playback_progress property. This property
|
|
cannot be changed if @.playing is $false.
|
|
]]
|
|
set {
|
|
return: bool(false); [[If $true, the property change has succeeded.]]
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
paused: bool; [[$true if paused, $false otherwise.]]
|
|
}
|
|
}
|
|
@property playback_position {
|
|
[[Position in the media file.
|
|
|
|
This property sets the current position of the media file
|
|
to $sec seconds since the beginning of the media file.
|
|
This only works on seekable streams. Setting the
|
|
position doesn't change the @.playing or @.paused states of the media file.
|
|
]]
|
|
set {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
sec: double; [[The position (in seconds).]]
|
|
}
|
|
}
|
|
@property playback_progress {
|
|
[[How much of the file has been played.
|
|
|
|
This function gets the progress in playing the file, the
|
|
return value is in the [0, 1] range.
|
|
]]
|
|
get {
|
|
}
|
|
values {
|
|
progress: double; [[The progress within the [0, 1] range.]]
|
|
}
|
|
}
|
|
@property playback_speed {
|
|
[[Control the playback speed of the media file.
|
|
|
|
This function control the speed with which the media file will
|
|
be played. 1.0 represents the normal speed, 2 double speed, 0.5
|
|
half speed and so on.
|
|
]]
|
|
set {
|
|
}
|
|
get {
|
|
}
|
|
values {
|
|
speed: double; [[The play speed in the [0, infinity) range.]]
|
|
}
|
|
}
|
|
}
|
|
}
|