- Enclosing class:
public static enum MediaPlayer.Status extends Enum<MediaPlayer.Status>
MediaPlayer status transitions are given in the
|Current \ Next||READY||PAUSED||PLAYING||STALLED||STOPPED||DISPOSED|
The table rows represent the current state of the player and the columns
the next state of the player. The cell at the intersection of a given row
and column lists the events which can cause a transition from the row
state to the column state. An empty cell represents an impossible transition.
The transitions to
HALTED and from
DISPOSED status are intentionally not tabulated.
is the initial status of the player before the media source is pre-rolled
and cannot be entered once exited.
DISPOSED is a terminal status
entered after dispose() method is invoked and cannot be exited.
status entered when a critical error occurs and may be transitioned into
from any other status except
MediaPlayer status values and transitions are
depicted in the following diagram:
Reaching the end of the media (or the
stopTime if this is defined) while playing does not cause the
status to change from
PLAYING. Therefore, for example, if
the media is played to its end and then a manual seek to an earlier
time within the media is performed, playing will continue from the
new media time.
- JavaFX 2.0
Nested Class Summary
Enum Constant Summary
Enum Constants Enum Constant DescriptionState of the player after dispose() method is invoked.State of the player when a critical error has occurred.State of the player when playback is paused.State of the player when it is currently playing.State of the player once it is prepared to play.State of the player when data coming into the buffer has slowed or stopped and the playback buffer does not have enough data to continue playing.State of the player when playback has stopped.State of the player immediately after creation.
Methods declared in class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Enum Constant Details
UNKNOWNpublic static final MediaPlayer.Status UNKNOWNState of the player immediately after creation. While in this state, property values are not reliable and should not be considered. Additionally, commands sent to the player while in this state will be buffered until the media is fully loaded and ready to play.
READYpublic static final MediaPlayer.Status READYState of the player once it is prepared to play. This state is entered only once when the movie is loaded and pre-rolled.
PAUSEDpublic static final MediaPlayer.Status PAUSEDState of the player when playback is paused. Requesting the player to play again will cause it to continue where it left off.
PLAYINGpublic static final MediaPlayer.Status PLAYINGState of the player when it is currently playing.
STOPPEDpublic static final MediaPlayer.Status STOPPEDState of the player when playback has stopped. Requesting the player to play again will cause it to start playback from the beginning.
STALLEDpublic static final MediaPlayer.Status STALLEDState of the player when data coming into the buffer has slowed or stopped and the playback buffer does not have enough data to continue playing. Playback will continue automatically when enough data are buffered to resume playback. If paused or stopped in this state, then buffering will continue but playback will not resume automatically when sufficient data are buffered.
HALTEDpublic static final MediaPlayer.Status HALTEDState of the player when a critical error has occurred. This state indicates playback can never continue again with this player. The player is no longer functional and a new player should be created.
DISPOSEDpublic static final MediaPlayer.Status DISPOSEDState of the player after dispose() method is invoked. This state indicates player is disposed, all resources are free and player SHOULD NOT be used again.
MediaViewobjects associated with disposed player can be reused.
- JavaFX 8.0
valuespublic static MediaPlayer.Status values()Returns an array containing the constants of this enum type, in the order they are declared.
- an array containing the constants of this enum type, in the order they are declared
valueOfReturns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)