java.lang.Object
one.jpro.platform.media.player.impl.FXMediaPlayer
- All Implemented Interfaces:
javafx.event.EventTarget,MediaEngine,MediaPlayer
MediaPlayer implementation for the desktop/mobile.- Author:
- Besmir Beqiri
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.BooleanPropertyWhether playing should start as soon as possible.javafx.beans.property.ReadOnlyIntegerPropertyThe number of completed playback cycles.javafx.beans.property.ReadOnlyDoublePropertyThe current rate of playback regardless of settings.javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration> The current media playback time.javafx.beans.property.IntegerPropertyThe number of times the media will be played.javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration> javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration> The total duration of play time if allowed to play until finished.final javafx.beans.property.ReadOnlyObjectProperty<MediaPlayerException> Observable property set to aMediaPlayerExceptionif an error occurs.final javafx.beans.property.ReadOnlyObjectProperty<MediaSource> The media source for the current player.javafx.beans.property.BooleanPropertyWhether the player audio is muted.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> Event handler invoked when the end of media is reached naturally.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> Event handler invoked when an error occurs.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> Event handler invoked when the status changes toPAUSED.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> Event handler invoked when the status changes toPLAYING.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> Event handler invoked when the status changes toREADY.javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> Event handler invoked when the playercurrentTimereachesstopTimeand will be repeating.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> Event handler invoked when the status changes toSTALLED.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> Event handler invoked when the status changes toSTOPPED.javafx.beans.property.DoublePropertyThe rate at which the media should be played.javafx.beans.property.ObjectProperty<javafx.util.Duration> The time offset where media should start playing, or restart from when repeating.javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.media.MediaPlayer.Status> The current status of this media player.javafx.beans.property.ObjectProperty<javafx.util.Duration> The time offset where media should stop playing or restart when repeating.javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration> The total amount of play time if allowed to play until finished.javafx.beans.property.DoubleProperty -
Field Summary
Fields inherited from interface one.jpro.platform.media.player.MediaPlayer
INDEFINITE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavafx.beans.property.BooleanPropertyWhether playing should start as soon as possible.javafx.event.EventDispatchChainbuildEventDispatchChain(javafx.event.EventDispatchChain tail) javafx.beans.property.ReadOnlyIntegerPropertyThe number of completed playback cycles.javafx.beans.property.ReadOnlyDoublePropertyThe current rate of playback regardless of settings.javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration> The current media playback time.javafx.beans.property.IntegerPropertyThe number of times the media will be played.javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration> javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration> The total duration of play time if allowed to play until finished.final javafx.beans.property.ReadOnlyObjectProperty<MediaPlayerException> Observable property set to aMediaPlayerExceptionif an error occurs.final intRetrieves the index of the current cycle.doubleGets the value of thecurrentRateproperty.javafx.util.DurationGets the value of thecurrentTimeproperty.intGets the value of thecycleCountproperty.javafx.util.DurationGets the value of thecycleDurationproperty.javafx.util.DurationGets the value of thedurationproperty.final MediaPlayerExceptiongetError()Retrieve the value of theerrorproperty ornullif there is no error.javafx.scene.media.MediaPlayerfinal MediaSourceRetrieves the current media source.final javafx.event.EventHandler<MediaPlayerEvent> Retrievers the event handler invoked when the end of media is reached naturally.final javafx.event.EventHandler<MediaPlayerEvent> Retrieves the event handler for errors.final javafx.event.EventHandler<MediaPlayerEvent> Retrieves theMediaPlayer.Status.PAUSEDevent handler.final javafx.event.EventHandler<MediaPlayerEvent> Retrieves theMediaPlayer.Status.PLAYINGevent handler.final javafx.event.EventHandler<MediaPlayerEvent> Retrieves theMediaPlayer.Status.READYevent handler.final javafx.event.EventHandler<MediaPlayerEvent> Retrieves the repeat event handler.final javafx.event.EventHandler<MediaPlayerEvent> Retrieves theMediaPlayer.Status.STALLEDevent handler.final javafx.event.EventHandler<MediaPlayerEvent> Retrieves theMediaPlayer.Status.STOPPEDevent handler.doublegetRate()Gets the value of therateproperty.javafx.util.DurationGets the value of thestartTimeproperty.javafx.scene.media.MediaPlayer.StatusRetrieves the current player status.javafx.util.DurationGets the value of thestopTimeproperty.javafx.util.DurationGets the value of thetotalDurationproperty.doubleGets the value of thevolumeproperty.booleanGets the value of theautoPlayproperty.booleanisMute()Gets the value of themuteproperty.final javafx.beans.property.ReadOnlyObjectProperty<MediaSource> The media source for the current player.javafx.beans.property.BooleanPropertyWhether the player audio is muted.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> Event handler invoked when the end of media is reached naturally.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> Event handler invoked when an error occurs.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> Event handler invoked when the status changes toPAUSED.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> Event handler invoked when the status changes toPLAYING.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> Event handler invoked when the status changes toREADY.javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> Event handler invoked when the playercurrentTimereachesstopTimeand will be repeating.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> Event handler invoked when the status changes toSTALLED.final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> Event handler invoked when the status changes toSTOPPED.voidpause()Pauses the player.voidplay()Starts playing the media.javafx.beans.property.DoublePropertyThe rate at which the media should be played.voidseek(javafx.util.Duration seekTime) Seeks the player to a new playback time.voidsetAutoPlay(boolean autoPlay) Sets the value of theautoPlayproperty.voidsetCycleCount(int cycleCount) Sets the value of thecycleCountproperty.voidsetMute(boolean value) Sets the value of themuteproperty.final voidsetOnEndOfMedia(javafx.event.EventHandler<MediaPlayerEvent> value) Sets the event handler invoked when the end of media is reached naturally.final voidsetOnError(javafx.event.EventHandler<MediaPlayerEvent> value) Sets the event handler to be called when an error occurs.final voidsetOnPaused(javafx.event.EventHandler<MediaPlayerEvent> value) Sets theMediaPlayer.Status.PAUSEDevent handler.final voidsetOnPlaying(javafx.event.EventHandler<MediaPlayerEvent> value) Sets theMediaPlayer.Status.PLAYINGevent handler.final voidsetOnReady(javafx.event.EventHandler<MediaPlayerEvent> value) Sets theMediaPlayer.Status.READYevent handler.final voidsetOnRepeat(javafx.event.EventHandler<MediaPlayerEvent> value) Sets the repeat event handler.final voidsetOnStalled(javafx.event.EventHandler<MediaPlayerEvent> value) Sets theMediaPlayer.Status.STALLEDevent handler.final voidsetOnStopped(javafx.event.EventHandler<MediaPlayerEvent> value) Sets theMediaPlayer.Status.STOPPEDevent handler.voidsetRate(double value) Sets the value of therateproperty.voidsetStartTime(javafx.util.Duration startTime) Sets the value of thestartTimeproperty.voidsetStopTime(javafx.util.Duration stopTime) Sets the value of thestopTimeproperty.voidsetVolume(double value) Sets the value of thevolumeproperty.javafx.beans.property.ObjectProperty<javafx.util.Duration> The time offset where media should start playing, or restart from when repeating.javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.media.MediaPlayer.Status> The current status of this media player.voidstop()Stops playing the media.javafx.beans.property.ObjectProperty<javafx.util.Duration> The time offset where media should stop playing or restart when repeating.javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration> The total amount of play time if allowed to play until finished.javafx.beans.property.DoubleProperty
-
Property Details
-
autoPlay
public javafx.beans.property.BooleanProperty autoPlayProperty- Specified by:
autoPlayPropertyin interfaceMediaPlayer- See Also:
-
startTime
public javafx.beans.property.ObjectProperty<javafx.util.Duration> startTimeProperty- See Also:
-
stopTime
public javafx.beans.property.ObjectProperty<javafx.util.Duration> stopTimeProperty- See Also:
-
cycleCount
public javafx.beans.property.IntegerProperty cycleCountProperty- Specified by:
cycleCountPropertyin interfaceMediaPlayer- See Also:
-
cycleDuration
public javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration> cycleDurationProperty- Specified by:
cycleDurationPropertyin interfaceMediaPlayer- See Also:
-
duration
public javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration> durationProperty- Specified by:
durationPropertyin interfaceMediaPlayer- Returns:
- the duration of the media
- See Also:
-
totalDuration
public javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration> totalDurationProperty- Specified by:
totalDurationPropertyin interfaceMediaPlayer- See Also:
-
currentTime
public javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration> currentTimeProperty- Specified by:
currentTimePropertyin interfaceMediaPlayer- Returns:
- the current playback time
- See Also:
-
volume
public javafx.beans.property.DoubleProperty volumeProperty- See Also:
-
mute
public javafx.beans.property.BooleanProperty muteProperty- See Also:
-
rate
public javafx.beans.property.DoubleProperty rateProperty- See Also:
-
currentRate
public javafx.beans.property.ReadOnlyDoubleProperty currentRateProperty- See Also:
-
mediaSource
- Specified by:
mediaSourcePropertyin interfaceMediaPlayer- See Also:
-
status
public javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.media.MediaPlayer.Status> statusPropertyThe current status of this media player.- Specified by:
statusPropertyin interfaceMediaPlayer- See Also:
-
currentCount
public javafx.beans.property.ReadOnlyIntegerProperty currentCountProperty- Specified by:
currentCountPropertyin interfaceMediaPlayer- See Also:
-
onReady
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> onReadyProperty- Specified by:
onReadyPropertyin interfaceMediaPlayer- See Also:
-
onPlaying
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> onPlayingProperty- Specified by:
onPlayingPropertyin interfaceMediaPlayer- See Also:
-
onPaused
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> onPausedProperty- Specified by:
onPausedPropertyin interfaceMediaPlayer- See Also:
-
onStalled
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> onStalledProperty- Specified by:
onStalledPropertyin interfaceMediaPlayer- See Also:
-
onStopped
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> onStoppedProperty- Specified by:
onStoppedPropertyin interfaceMediaPlayer- See Also:
-
onEndOfMedia
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> onEndOfMediaProperty- Specified by:
onEndOfMediaPropertyin interfaceMediaPlayer- See Also:
-
onRepeat
public javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> onRepeatProperty- Specified by:
onRepeatPropertyin interfaceMediaPlayer- See Also:
-
onError
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> onErrorProperty- Specified by:
onErrorPropertyin interfaceMediaPlayer- See Also:
-
error
- Specified by:
errorPropertyin interfaceMediaPlayer- See Also:
-
-
Constructor Details
-
FXMediaPlayer
-
-
Method Details
-
getMediaPlayer
public javafx.scene.media.MediaPlayer getMediaPlayer() -
isAutoPlay
public boolean isAutoPlay()Gets the value of theautoPlayproperty.- Specified by:
isAutoPlayin interfaceMediaPlayer- Property description:
- Returns:
- the value of the
autoPlayproperty - See Also:
-
setAutoPlay
public void setAutoPlay(boolean autoPlay) Sets the value of theautoPlayproperty.- Specified by:
setAutoPlayin interfaceMediaPlayer- Property description:
- Parameters:
autoPlay- the value for theautoPlayproperty- See Also:
-
autoPlayProperty
public javafx.beans.property.BooleanProperty autoPlayProperty()Description copied from interface:MediaPlayerWhether playing should start as soon as possible. For a new player this will occur once the player has reached the READY state. The default value isfalse.- Specified by:
autoPlayPropertyin interfaceMediaPlayer- Returns:
- the
autoPlayproperty - See Also:
-
getStartTime
public javafx.util.Duration getStartTime()Gets the value of thestartTimeproperty.- Property description:
- Returns:
- the value of the
startTimeproperty - See Also:
-
setStartTime
public void setStartTime(javafx.util.Duration startTime) Sets the value of thestartTimeproperty.- Property description:
- Parameters:
startTime- the value for thestartTimeproperty- See Also:
-
startTimeProperty
public javafx.beans.property.ObjectProperty<javafx.util.Duration> startTimeProperty()Description copied from interface:MediaPlayerThe time offset where media should start playing, or restart from when repeating. When playback is stopped, the current time is reset to this value. If this value is positive, then the first time the media is played there might be a delay before playing begins unless the play position can be set to an arbitrary time within the media. This could occur for example for a video which does not contain a lookup table of the offsets of intra-frames in the video stream. In such a case the video frames would need to be skipped over until the position of the first intra-frame before the start time was reached. The default value isDuration.ZERO.Constraints:
0 ≤ startTime <stopTime- Returns:
- the
startTimeproperty - See Also:
-
getStopTime
public javafx.util.Duration getStopTime()Gets the value of thestopTimeproperty.- Property description:
- Returns:
- the value of the
stopTimeproperty - See Also:
-
setStopTime
public void setStopTime(javafx.util.Duration stopTime) Sets the value of thestopTimeproperty.- Property description:
- Parameters:
stopTime- the value for thestopTimeproperty- See Also:
-
stopTimeProperty
public javafx.beans.property.ObjectProperty<javafx.util.Duration> stopTimeProperty()Description copied from interface:MediaPlayerThe time offset where media should stop playing or restart when repeating. The default value is.MediaPlayer.getDuration()Constraints:
startTime< stopTime ≤MediaPlayer.duration- Returns:
- the
stopTimeproperty - See Also:
-
getCycleCount
public int getCycleCount()Gets the value of thecycleCountproperty.- Specified by:
getCycleCountin interfaceMediaPlayer- Property description:
- Returns:
- the value of the
cycleCountproperty - See Also:
-
setCycleCount
public void setCycleCount(int cycleCount) Sets the value of thecycleCountproperty.- Specified by:
setCycleCountin interfaceMediaPlayer- Property description:
- Parameters:
cycleCount- the value for thecycleCountproperty- See Also:
-
cycleCountProperty
public javafx.beans.property.IntegerProperty cycleCountProperty()Description copied from interface:MediaPlayerThe number of times the media will be played. By default,cycleCountis set to1meaning the media will only be played once. SettingcycleCountto a value greater than 1 will cause the media to play the given number of times or until stopped. If set toINDEFINITE, playback will repeat until stop() or pause() is called.constraints:
cycleCount ≥ 1- Specified by:
cycleCountPropertyin interfaceMediaPlayer- Returns:
- the
cycleCountproperty - See Also:
-
getCycleDuration
public javafx.util.Duration getCycleDuration()Gets the value of thecycleDurationproperty.- Specified by:
getCycleDurationin interfaceMediaPlayer- Property description:
- Returns:
- the value of the
cycleDurationproperty - See Also:
-
cycleDurationProperty
public javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration> cycleDurationProperty()Description copied from interface:MediaPlayerThe amount of time between thestartTimeandstopTimeof this player. For the total duration of the MediaSource use theMediaPlayer.durationproperty.- Specified by:
cycleDurationPropertyin interfaceMediaPlayer- Returns:
- the
cycleDurationproperty - See Also:
-
getDuration
public javafx.util.Duration getDuration()Gets the value of thedurationproperty.- Specified by:
getDurationin interfaceMediaPlayer- Property description:
- Returns:
- the value of the
durationproperty - See Also:
-
durationProperty
public javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration> durationProperty()Description copied from interface:MediaPlayerThe total duration of play time if allowed to play until finished. If the Media duration isDuration.UNKNOWN, then this will likewise beDuration.UNKNOWN.- Specified by:
durationPropertyin interfaceMediaPlayer- Returns:
- the
durationproperty - See Also:
-
getTotalDuration
public javafx.util.Duration getTotalDuration()Gets the value of thetotalDurationproperty.- Specified by:
getTotalDurationin interfaceMediaPlayer- Property description:
- Returns:
- the value of the
totalDurationproperty - See Also:
-
totalDurationProperty
public javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration> totalDurationProperty()Description copied from interface:MediaPlayerThe total amount of play time if allowed to play until finished. IfcycleCountis set toINDEFINITEthen this will also be INDEFINITE. If the media resource duration is UNKNOWN, then this will likewise be UNKNOWN. Otherwise, total duration will be the product of cycleDuration and cycleCount.- Specified by:
totalDurationPropertyin interfaceMediaPlayer- Returns:
- the
totalDurationproperty - See Also:
-
getCurrentTime
public javafx.util.Duration getCurrentTime()Gets the value of thecurrentTimeproperty.- Specified by:
getCurrentTimein interfaceMediaPlayer- Property description:
- Returns:
- the value of the
currentTimeproperty - See Also:
-
currentTimeProperty
public javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration> currentTimeProperty()Description copied from interface:MediaPlayerThe current media playback time. This property is read-only: useMediaPlayer.seek(Duration)to change playback to a different stream position.- Specified by:
currentTimePropertyin interfaceMediaPlayer- Returns:
- the
currentTimeproperty - See Also:
-
getVolume
public double getVolume()Gets the value of thevolumeproperty.- Property description:
- Returns:
- the value of the
volumeproperty - See Also:
-
setVolume
public void setVolume(double value) Sets the value of thevolumeproperty.- Property description:
- Parameters:
value- the value for thevolumeproperty- See Also:
-
volumeProperty
public javafx.beans.property.DoubleProperty volumeProperty()- Returns:
- the
volumeproperty - See Also:
-
isMute
public boolean isMute()Gets the value of themuteproperty.- Property description:
- Returns:
- the value of the
muteproperty - See Also:
-
setMute
public void setMute(boolean value) Sets the value of themuteproperty.- Property description:
- Parameters:
value- the value for themuteproperty- See Also:
-
muteProperty
public javafx.beans.property.BooleanProperty muteProperty()Description copied from interface:MediaPlayerWhether the player audio is muted. A value oftrueindicates that audio is not being produced. The value of this property has no effect onvolume, i.e., if the audio is muted and then unmuted, audio playback will resume at the same audible level provided of course that thevolumeproperty has not been modified meanwhile. The default value isfalse.- Returns:
- the
muteproperty - See Also:
-
getRate
public double getRate()Gets the value of therateproperty.- Property description:
- Returns:
- the value of the
rateproperty - See Also:
-
setRate
public void setRate(double value) Sets the value of therateproperty.- Property description:
- Parameters:
value- the value for therateproperty- See Also:
-
rateProperty
public javafx.beans.property.DoubleProperty rateProperty()Description copied from interface:MediaPlayerThe rate at which the media should be played. For example, a rate of1.0plays the media at its normal (encoded) playback rate,2.0plays back at twice the normal rate, etc. The currently supported range of rates is[0.0, 8.0]. The default value is1.0.- Returns:
- the
rateproperty - See Also:
-
getCurrentRate
public double getCurrentRate()Gets the value of thecurrentRateproperty.- Property description:
- Returns:
- the value of the
currentRateproperty - See Also:
-
currentRateProperty
public javafx.beans.property.ReadOnlyDoubleProperty currentRateProperty()Description copied from interface:MediaPlayerThe current rate of playback regardless of settings. For example, ifrateis set to 1.0 and the player is paused or stalled, thencurrentRatewill be zero.- Returns:
- the
currentRateproperty - See Also:
-
play
public void play()Description copied from interface:MediaPlayer -
pause
public void pause()Description copied from interface:MediaPlayerPauses the player. Once the player is actually paused thestatuswill be set toMediaPlayer.Status.PAUSED. -
stop
public void stop()Description copied from interface:MediaPlayerStops playing the media. This operation resets playback tostartTimeandcurrentCountto zero. Once the player is actually stopped, thestatuswill be set toMediaPlayer.Status.STOPPED. The only transitions out ofSTOPPEDstatus are toMediaPlayer.Status.PAUSEDandMediaPlayer.Status.PLAYINGwhich occur after invokingMediaPlayer.pause()orMediaPlayer.play(), respectively. While stopped, the player will not respond to playback position changes requested byMediaPlayer.seek(Duration), although this is not the case for the player on the web when running via JPro. -
seek
public void seek(javafx.util.Duration seekTime) Description copied from interface:MediaPlayerSeeks the player to a new playback time. Invoking this method will have no effect while the player status isMediaPlayer.Status.STOPPEDor media duration isDuration.INDEFINITE.The behavior of
seek()is constrained as follows where start time and stop time indicate the effective lower and upper bounds, respectively, of media playback:MediaPlayer Seek Table seekTime seek position nullno change Duration.UNKNOWNno change Duration.INDEFINITEstop time seekTime < start time start time seekTime > stop time stop time start time ≤ seekTime ≤ stop time seekTime - Parameters:
seekTime- the requested playback time
-
getMediaSource
Description copied from interface:MediaPlayerRetrieves the current media source.- Specified by:
getMediaSourcein interfaceMediaPlayer- Returns:
MediaSourceobject
-
mediaSourceProperty
Description copied from interface:MediaPlayerThe media source for the current player. It holds the information on where it resource is located and accessed either via a string form URI locally, or viaWebAPI.JSFileremotely.- Specified by:
mediaSourcePropertyin interfaceMediaPlayer- Returns:
- the
mediaSourceproperty - See Also:
-
getStatus
public javafx.scene.media.MediaPlayer.Status getStatus()Description copied from interface:MediaPlayerRetrieves the current player status.- Specified by:
getStatusin interfaceMediaPlayer- Returns:
- the playback
MediaPlayer.Status
-
statusProperty
public javafx.beans.property.ReadOnlyObjectProperty<javafx.scene.media.MediaPlayer.Status> statusProperty()The current status of this media player.- Specified by:
statusPropertyin interfaceMediaPlayer- Returns:
- the
statusproperty - See Also:
-
getCurrentCount
public final int getCurrentCount()Description copied from interface:MediaPlayerRetrieves the index of the current cycle.- Specified by:
getCurrentCountin interfaceMediaPlayer- Returns:
- the current cycle index
-
currentCountProperty
public javafx.beans.property.ReadOnlyIntegerProperty currentCountProperty()Description copied from interface:MediaPlayerThe number of completed playback cycles. On the first pass, the value should be 0. On the second pass, the value should be 1 and so on. It is incremented at the end of each cycle just prior to seeking back tostartTime, i.e., whenstopTimeor the end of media has been reached.- Specified by:
currentCountPropertyin interfaceMediaPlayer- Returns:
- the
currentCountproperty - See Also:
-
getOnReady
Description copied from interface:MediaPlayerRetrieves theMediaPlayer.Status.READYevent handler.- Specified by:
getOnReadyin interfaceMediaPlayer- Returns:
- the event handler or
null.
-
setOnReady
Description copied from interface:MediaPlayerSets theMediaPlayer.Status.READYevent handler.- Specified by:
setOnReadyin interfaceMediaPlayer- Parameters:
value- the event handler ornull.
-
onReadyProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> onReadyProperty()Description copied from interface:MediaPlayerEvent handler invoked when the status changes toREADY.- Specified by:
onReadyPropertyin interfaceMediaPlayer- Returns:
- the
onReadyproperty - See Also:
-
getOnPlaying
Description copied from interface:MediaPlayerRetrieves theMediaPlayer.Status.PLAYINGevent handler.- Specified by:
getOnPlayingin interfaceMediaPlayer- Returns:
- the event handler or
null.
-
setOnPlaying
Description copied from interface:MediaPlayerSets theMediaPlayer.Status.PLAYINGevent handler.- Specified by:
setOnPlayingin interfaceMediaPlayer- Parameters:
value- the event handler ornull.
-
onPlayingProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> onPlayingProperty()Description copied from interface:MediaPlayerEvent handler invoked when the status changes toPLAYING.- Specified by:
onPlayingPropertyin interfaceMediaPlayer- Returns:
- the
onPlayingproperty - See Also:
-
getOnPaused
Description copied from interface:MediaPlayerRetrieves theMediaPlayer.Status.PAUSEDevent handler.- Specified by:
getOnPausedin interfaceMediaPlayer- Returns:
- the event handler or
null.
-
setOnPaused
Description copied from interface:MediaPlayerSets theMediaPlayer.Status.PAUSEDevent handler.- Specified by:
setOnPausedin interfaceMediaPlayer- Parameters:
value- the event handler ornull.
-
onPausedProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> onPausedProperty()Description copied from interface:MediaPlayerEvent handler invoked when the status changes toPAUSED.- Specified by:
onPausedPropertyin interfaceMediaPlayer- Returns:
- the
onPausedproperty - See Also:
-
getOnStalled
Description copied from interface:MediaPlayerRetrieves theMediaPlayer.Status.STALLEDevent handler.- Specified by:
getOnStalledin interfaceMediaPlayer- Returns:
- the event handler or
null.
-
setOnStalled
Description copied from interface:MediaPlayerSets theMediaPlayer.Status.STALLEDevent handler.- Specified by:
setOnStalledin interfaceMediaPlayer- Parameters:
value- the event handler ornull.
-
onStalledProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> onStalledProperty()Description copied from interface:MediaPlayerEvent handler invoked when the status changes toSTALLED.- Specified by:
onStalledPropertyin interfaceMediaPlayer- Returns:
- the
onStalledproperty - See Also:
-
getOnStopped
Description copied from interface:MediaPlayerRetrieves theMediaPlayer.Status.STOPPEDevent handler.- Specified by:
getOnStoppedin interfaceMediaPlayer- Returns:
- the event handler or
null.
-
setOnStopped
Description copied from interface:MediaPlayerSets theMediaPlayer.Status.STOPPEDevent handler.- Specified by:
setOnStoppedin interfaceMediaPlayer- Parameters:
value- the event handler ornull.
-
onStoppedProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> onStoppedProperty()Description copied from interface:MediaPlayerEvent handler invoked when the status changes toSTOPPED.- Specified by:
onStoppedPropertyin interfaceMediaPlayer- Returns:
- the
onStoppedproperty - See Also:
-
getOnEndOfMedia
Description copied from interface:MediaPlayerRetrievers the event handler invoked when the end of media is reached naturally.- Specified by:
getOnEndOfMediain interfaceMediaPlayer- Returns:
- the event handler or
null.
-
setOnEndOfMedia
Description copied from interface:MediaPlayerSets the event handler invoked when the end of media is reached naturally.- Specified by:
setOnEndOfMediain interfaceMediaPlayer- Parameters:
value- the event handler ornull.
-
onEndOfMediaProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> onEndOfMediaProperty()Description copied from interface:MediaPlayerEvent handler invoked when the end of media is reached naturally.- Specified by:
onEndOfMediaPropertyin interfaceMediaPlayer- Returns:
- the
onEndOfMediaproperty - See Also:
-
getOnRepeat
Description copied from interface:MediaPlayerRetrieves the repeat event handler.- Specified by:
getOnRepeatin interfaceMediaPlayer- Returns:
- the event handler or
null.
-
setOnRepeat
Description copied from interface:MediaPlayerSets the repeat event handler.- Specified by:
setOnRepeatin interfaceMediaPlayer- Parameters:
value- the event handler ornull.
-
onRepeatProperty
public javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> onRepeatProperty()Description copied from interface:MediaPlayerEvent handler invoked when the playercurrentTimereachesstopTimeand will be repeating. This callback is made prior to seeking back tostartTime.- Specified by:
onRepeatPropertyin interfaceMediaPlayer- Returns:
- the
onRepeatproperty - See Also:
-
getOnError
Description copied from interface:MediaPlayerRetrieves the event handler for errors.- Specified by:
getOnErrorin interfaceMediaPlayer- Returns:
- the event handler.
-
setOnError
Description copied from interface:MediaPlayerSets the event handler to be called when an error occurs.- Specified by:
setOnErrorin interfaceMediaPlayer- Parameters:
value- the event handler ornull.
-
onErrorProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>> onErrorProperty()Description copied from interface:MediaPlayerEvent handler invoked when an error occurs.- Specified by:
onErrorPropertyin interfaceMediaPlayer- Returns:
- the
onErrorproperty - See Also:
-
getError
Description copied from interface:MediaPlayerRetrieve the value of theerrorproperty ornullif there is no error.- Specified by:
getErrorin interfaceMediaPlayer- Returns:
- a
MediaPlayerExceptionornull.
-
errorProperty
Description copied from interface:MediaPlayerObservable property set to aMediaPlayerExceptionif an error occurs.- Specified by:
errorPropertyin interfaceMediaPlayer- Returns:
- the
errorproperty - See Also:
-
buildEventDispatchChain
public javafx.event.EventDispatchChain buildEventDispatchChain(javafx.event.EventDispatchChain tail) - Specified by:
buildEventDispatchChainin interfacejavafx.event.EventTarget
-