Overview
The MediaPlayer
class provides the controls for playing media.
It is used in combination with the Media
and MediaViewer
classes to display and control media playing. Note that the MediaPlayer
does not contain any visual elements so must be used with the MediaView
class to view the media.
Profile: common
Variable Summary
access | name | type | Can Read | Can Init | Can Write | Default Value | description |
---|---|---|---|---|---|---|---|
public | autoPlay | Boolean |
If |
||||
public | balance | Number |
Defines the balance, or left right setting, of the audio output. Defines the balance, or left right setting, of the audio output.
Value ranges continuously from Profile: common |
||||
public | BUFFERING | Integer |
Status value when player is buffering. Status value when player is buffering. Buffering may occur when player is paused or playing Profile: common |
||||
public-read | bufferProgressTime | Duration |
For a bufferred stream, the current buffer position which indicates how
much media can be played without stalling the |
||||
public | currentCount | Number |
Defines the current number of time the media has repeated |
||||
public | currentTime | Duration |
The current media time, may be read to indicate the current position or written to cause the media to seek to the set position. The current media time, may be read to indicate the current position
or written to cause the media to seek to the set position. Note that
since the variable is being updated by the JavaFX rutime, Profile: common |
||||
public | enabledTracks | Track[] |
The sequence of tracks that are currently enabled on this |
||||
public | fader | Number |
The fader, or forward and back setting, of audio output on 4+ channel output. The fader, or forward and back setting, of audio output
on 4+ channel output.
value ranges continuously from Profile: common |
||||
public | media | Media |
Defines the source |
||||
public | mute | Boolean |
Equals |
||||
public | onBuffering | function(:Duration):Void |
Invoked when the player is buffering data. Invoked when the player is buffering data.
Profile: common |
||||
public | onEndOfMedia | function():Void |
Invoked when the player reaches the end of media |
||||
public | onError | function(:MediaError):Void |
The The
See Also:
Profile: common |
||||
public | onRepeat | function():Void |
Invoked when the player reaches the end of media. |
||||
public | onStalled | function(:Duration):Void |
Invoked when the player has stalled because it was not receiving data fast enough to continue playing. Invoked when the player has stalled
because it was not receiving data fast enough to continue playing.
Profile: common |
||||
public | paused | Boolean |
Indicated if the player has been paused, either programatically, by the user, or because the media has finished playing |
||||
public-read | PAUSED | Integer |
Status value when player is paused |
||||
public | PLAYING | Integer |
status value when player is playing |
||||
public | rate | Number |
Defines the rate at which the media is being played. Defines the rate at which the media is being played.
Rate Profile: common |
||||
public | REPEAT_FOREVER | Integer |
Value of |
||||
public | REPEAT_NONE | Number |
Value of |
||||
public | repeatCount | Number |
Defines the number of times the media should repeat. Defines the number of times the media should repeat. if repeatCount is 1 the media will play once. if it is REPEAT_FOREVER, it will repeat indefinitely Profile: common |
||||
public | STALLED | Integer |
Status value when player is stalled. Status value when player is stalled.
See Also:
Profile: common |
||||
public | startTime | Duration |
Defines the time offset where media should start playing, or restart from when repeating |
||||
public | status | Integer |
Current status of player |
||||
public | stopTime | Duration |
Defines the time offset where media should stop playing or restart when repeating |
||||
public-read | supportsMultiViews | Boolean |
Indicates if this player can have multiple views associated with it. |
||||
public | timers | MediaTimer[] |
the sequence media timers for this player. the sequence media timers for this player.
For each
See Also:
Profile: common |
||||
public | volume | Number |
Defines the volume at which the media is being played. Defines the volume at which the media is being played.
Profile: common |