Gambas Documentation - /comp/gb.media/mediaplayer

/comp/gb.media/mediaplayer

# MediaPlayer (gb.media)

This class implements a fully functional media player.

This class inherits MediaPipeline.
This class is
Create a new MediaPlayer.
creatable
.
This class acts like a
Return the value of a MediaControl property from its name.
read
/
Define the value of a MediaControl property from its name.
write
array.

Properties | Methods | Events
--- | --- | ---

Return a virtual object used for managing the audio part of the media player.
Audio
Return a virtual object that allows to manipulate the video balances (brightness, hue, saturation...).
Balance
Return or set if buffering is enabled.
Buffering
Return a virtual collection of all MediaContainer children.
Children
Return or set the network connection speed in kbps.
ConnectionSpeed
Return the duration of the processed data in seconds.
Duration
Return or set the source control.
Input
Return the name of all inputs.
Inputs
A synonymous for Duration.
Length
Return or set the name of the MediaControl.
Name
Return the name of all outputs.
Outputs
Return the parent of the control.
Parent
Return or set the current position inside the processed data in seconds.
Position
Return or set if progressive download buffering is enabled.
ProgressiveDownload
Return or define the state of the MediaControl.
State
Return a virtual object used for managing subtitles.
Subtitles
Return or set the MediaControl tag.
Tag
Return the type of the MediaControl.
Type
Return or set the URI of the currently played media stream.
URL
Return a virtual object used for managing the media player video stream.
Video

Choose an input of a child control that will act as an input for the container.
AddInput
Choose an output of a child control that will act as an output for the container.
AddOutput
Close the pipeline, i.e. set its state and the state of all children to Null.
Close
Return the last image displayed by a video output control.
GetLastImage
Return the description of an input or output from its name.
GetLink
Link the current control to the Destination control as soon as a new output appears on it.
LinkLaterTo
Link an output of the current MediaControl to the input of the Destination MediaControl.
LinkTo
Pause the pipeline, i.e. set its state and the state of all children to Paused.
Pause
Start playing, i.e. set the state of the pipeline and all its children to Playing.
Play
This methods tells the MediaControl to draw its output inside a specific GUI control.
SetWindow
Stop the pipeline, i.e. set its state and the state of all its children to Ready.
Stop

This event is raised when the current uri is about to finish.
AboutToFinish
This event is raised whenever the number or order of the audio streams has changed.
AudioChanged
This event is raised when the pipeline is buffering data.
Buffering
Raised when the duration of a pipeline has changed.
Duration
Raised when the end of stream has been reached while playing.
End
Event
Raised when a child control emits a message.
Message
This event is raised while the media is played, and until it is stopped.
Progress
This event is raised when the state of the control has changed.
State
This event is raised whenever the number or order of the subtitles streams has changed.
SubtitlesChanged
Raised when some tags have been found.
Tag
This event is raised whenever the number or order of the video streams has changed.
VideoChanged