Basics
Guides
API Reference
Basics
Guides
API Reference
[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.

Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.