[15:7] extends: FxObj
Wraps JavaFX MediaPlayer, which controls playback of a Media resource, including play, pause, stop, seek, volume, and loop control. Construct it with a Media object, then call play() to start playback. Volume is set as a value between 0.0 (silent) and 1.0 (full). setCycleCount() controls how many times the media repeats, and setOnEndOfMedia() registers a callback that fires when playback reaches the end.
MediaPlayer (object MediaObj)
Creates a new MediaPlayer that will play the given Media resource.
MediaObj is a Media object representing the audio or video resource.this objectplay ()
Starts or resumes playback of the media.
this object for chainingpause ()
Pauses playback at the current position.
this object for chainingstop ()
Stops playback and resets the position to the beginning.
this object for chainingseek (double Ms)
Seeks to the specified position in the media.
Ms is a double with the position in milliseconds.this object for chainingsetVolume (double Vol)
Sets the playback volume.
Vol is a double between 0.0 (silent) and 1.0 (full volume).this object for chaininggetVolume ()
Returns the current playback volume.
A double with the volume between 0.0 and 1.0.setMute (bool Mute)
Sets whether the player is muted without changing the volume value.
Mute is a bool with true to mute the player.this object for chainingisMute ()
Returns whether the player is currently muted.
A bool with true if the player is muted.setAutoPlay (bool Auto)
Sets whether the player starts playback automatically when ready.
Auto is a bool with true to enable auto-play.this object for chainingsetCycleCount (int Count)
Sets how many times the media repeats before stopping.
Count is an int with the cycle count, or MediaPlayer.INDEFINITE to loop forever.this object for chainingsetOnEndOfMedia (callback OnEnd)
Sets a callback that fires when playback reaches the end of the media.
OnEnd is a callback to call when media playback ends.this object for chainingsetOnReady (callback OnReady)
Sets a callback that fires when the player is ready to begin playback.
OnReady is a callback to call when the player is ready.this object for chaininggetStatus ()
Returns the current status of the media player.
A string with the status, e.g., PLAYING, PAUSED, or STOPPED.dispose ()
Disposes of this MediaPlayer, releasing all associated resources.
getAudioEqualizer ()
Returns the AudioEqualizer associated with this player. Use it to adjust per-band gain on the audio output.
An AJO holding the javafx.scene.media.AudioEqualizer.getError ()
Returns the most recent player error, or null when no error has occurred.
An AJO holding the javafx.scene.media.MediaException, or null.errorProperty ()
Returns the read-only property holding the most recent player error.
A ReadOnlyObjectProperty AJO holding the MediaException.setOnError (callback Cb)
Sets a callback that fires when an error occurs in the player.
Cb is a callback invoked with no arguments.this objectgetOnError ()
Returns the current onError handler.
An AJO holding the Runnable, or null.onErrorProperty ()
Returns the property holding the onError handler.
An ObjectProperty AJO holding the Runnable.getMedia ()
Returns the Media resource this player is bound to.
An AJO holding the javafx.scene.media.Media.isAutoPlay ()
Returns whether the player automatically starts playback once it is ready.
A bool with true when auto-play is enabled.autoPlayProperty ()
Returns the property holding the autoPlay flag.
A BooleanProperty AJO.setRate (double Rate)
Sets the playback rate. 1.0 is normal speed, values above 1.0 play faster, and values below 1.0 play slower.
Rate is a double with the playback rate.this objectgetRate ()
Returns the requested playback rate.
A double with the playback rate.rateProperty ()
Returns the property holding the playback rate.
A DoubleProperty AJO.getCurrentRate ()
Returns the current actual playback rate, which may differ from the requested rate while seeking or buffering.
A double with the current rate.currentRateProperty ()
Returns the read-only property holding the current playback rate.
A ReadOnlyDoubleProperty AJO.volumeProperty ()
Returns the property holding the volume value.
A DoubleProperty AJO.setBalance (double Balance)
Sets the stereo balance. -1.0 is full left, 0.0 is centered, and 1.0 is full right.
Balance is a double between -1.0 and 1.0.this objectgetBalance ()
Returns the stereo balance value.
A double between -1.0 and 1.0.balanceProperty ()
Returns the property holding the stereo balance.
A DoubleProperty AJO.setStartTime (double Ms)
Sets the start time used as the playback start position.
Ms is a double with the start time in milliseconds.this objectgetStartTime ()
Returns the Duration used as the playback start position.
An AJO holding the javafx.util.Duration.startTimeProperty ()
Returns the property holding the start Duration. The wrapper seeds the property with the current getStartTime() value first because JavaFX lazy-initializes the underlying ObjectProperty with a null value, which leaves the field null and crashes calculateCycleDuration when the player later transitions to READY on the JavaFX Application Thread.
An ObjectProperty AJO holding the Duration.setStopTime (double Ms)
Sets the stop time used as the playback stop position.
Ms is a double with the stop time in milliseconds.this objectgetStopTime ()
Returns the Duration used as the playback stop position.
An AJO holding the javafx.util.Duration.stopTimeProperty ()
Returns the property holding the stop Duration. The wrapper seeds the property with the current getStopTime() value first because JavaFX lazy-initializes the underlying ObjectProperty with a null value, which leaves the field null and crashes calculateCycleDuration when the player later transitions to READY on the JavaFX Application Thread.
An ObjectProperty AJO holding the Duration.getCycleDuration ()
Returns the Duration of a single playback cycle.
An AJO holding the javafx.util.Duration.cycleDurationProperty ()
Returns the read-only property holding the cycle Duration.
A ReadOnlyObjectProperty AJO holding the Duration.getTotalDuration ()
Returns the total Duration of all configured playback cycles.
An AJO holding the javafx.util.Duration.totalDurationProperty ()
Returns the read-only property holding the total Duration.
A ReadOnlyObjectProperty AJO holding the Duration.getCurrentTime ()
Returns the current playback position as a Duration.
An AJO holding the javafx.util.Duration.currentTimeProperty ()
Returns the read-only property holding the current playback Duration.
A ReadOnlyObjectProperty AJO holding the Duration.statusProperty ()
Returns the read-only property holding the player Status enum value.
A ReadOnlyObjectProperty AJO holding the Status.getBufferProgressTime ()
Returns the Duration up to which the player has buffered media.
An AJO holding the javafx.util.Duration.bufferProgressTimeProperty ()
Returns the read-only property holding the buffer progress Duration.
A ReadOnlyObjectProperty AJO holding the Duration.getCycleCount ()
Returns the configured cycle count, or MediaPlayer.INDEFINITE for an infinite loop.
An int with the cycle count.cycleCountProperty ()
Returns the property holding the cycle count.
An IntegerProperty AJO.getCurrentCount ()
Returns the number of cycles that have completed so far.
An int with the current cycle count.currentCountProperty ()
Returns the read-only property holding the current cycle count.
A ReadOnlyIntegerProperty AJO.muteProperty ()
Returns the property holding the mute flag.
A BooleanProperty AJO.setOnMarker (callback Cb)
Sets a callback that fires when a named media marker is reached.
Cb is a callback that receives the MediaMarkerEvent.this objectgetOnMarker ()
Returns the current onMarker handler.
An AJO holding the EventHandler, or null.onMarkerProperty ()
Returns the property holding the onMarker handler.
An ObjectProperty AJO holding the EventHandler.getOnEndOfMedia ()
Returns the current onEndOfMedia handler.
An AJO holding the Runnable, or null.onEndOfMediaProperty ()
Returns the property holding the onEndOfMedia handler.
An ObjectProperty AJO holding the Runnable.getOnReady ()
Returns the current onReady handler.
An AJO holding the Runnable, or null.onReadyProperty ()
Returns the property holding the onReady handler.
An ObjectProperty AJO holding the Runnable.setOnPlaying (callback Cb)
Sets a callback that fires when playback starts.
Cb is a callback invoked with no arguments.this objectgetOnPlaying ()
Returns the current onPlaying handler.
An AJO holding the Runnable, or null.onPlayingProperty ()
Returns the property holding the onPlaying handler.
An ObjectProperty AJO holding the Runnable.setOnPaused (callback Cb)
Sets a callback that fires when playback pauses.
Cb is a callback invoked with no arguments.this objectgetOnPaused ()
Returns the current onPaused handler.
An AJO holding the Runnable, or null.onPausedProperty ()
Returns the property holding the onPaused handler.
An ObjectProperty AJO holding the Runnable.setOnStopped (callback Cb)
Sets a callback that fires when playback stops.
Cb is a callback invoked with no arguments.this objectgetOnStopped ()
Returns the current onStopped handler.
An AJO holding the Runnable, or null.onStoppedProperty ()
Returns the property holding the onStopped handler.
An ObjectProperty AJO holding the Runnable.setOnHalted (callback Cb)
Sets a callback that fires when the player enters the HALTED state.
Cb is a callback invoked with no arguments.this objectgetOnHalted ()
Returns the current onHalted handler.
An AJO holding the Runnable, or null.onHaltedProperty ()
Returns the property holding the onHalted handler.
An ObjectProperty AJO holding the Runnable.setOnRepeat (callback Cb)
Sets a callback that fires when a playback cycle repeats.
Cb is a callback invoked with no arguments.this objectgetOnRepeat ()
Returns the current onRepeat handler.
An AJO holding the Runnable, or null.onRepeatProperty ()
Returns the property holding the onRepeat handler.
An ObjectProperty AJO holding the Runnable.setOnStalled (callback Cb)
Sets a callback that fires when playback stalls waiting for data.
Cb is a callback invoked with no arguments.this objectgetOnStalled ()
Returns the current onStalled handler.
An AJO holding the Runnable, or null.onStalledProperty ()
Returns the property holding the onStalled handler.
An ObjectProperty AJO holding the Runnable.setAudioSpectrumNumBands (int Bands)
Sets how many frequency bands the audio spectrum analyser computes.
Bands is an int with the band count.this objectgetAudioSpectrumNumBands ()
Returns the number of frequency bands the audio spectrum analyser computes.
An int with the band count.audioSpectrumNumBandsProperty ()
Returns the property holding the audio spectrum band count.
An IntegerProperty AJO.setAudioSpectrumInterval (double Interval)
Sets the interval in seconds between audio spectrum updates.
Interval is a double with the update interval in seconds.this objectgetAudioSpectrumInterval ()
Returns the audio spectrum update interval in seconds.
A double with the interval in seconds.audioSpectrumIntervalProperty ()
Returns the property holding the audio spectrum update interval.
A DoubleProperty AJO.setAudioSpectrumThreshold (int Threshold)
Sets the minimum level (in dB) reported by the audio spectrum analyser.
Threshold is an int with the threshold in decibels.this objectgetAudioSpectrumThreshold ()
Returns the audio spectrum threshold in decibels.
An int with the threshold in decibels.audioSpectrumThresholdProperty ()
Returns the property holding the audio spectrum threshold.
An IntegerProperty AJO.setAudioSpectrumListener (object ListenerObj)
Sets the AudioSpectrumListener that receives spectrum data on each update interval.
ListenerObj is an AJO holding a javafx.scene.media.AudioSpectrumListener.this objectgetAudioSpectrumListener ()
Returns the current AudioSpectrumListener.
An AJO holding the AudioSpectrumListener, or null.audioSpectrumListenerProperty ()
Returns the property holding the AudioSpectrumListener.
An ObjectProperty AJO holding the AudioSpectrumListener.