Java javafx.scene.media MediaPlayer fields, constructors, methods, implement or subclass

Example usage for Java javafx.scene.media MediaPlayer fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for javafx.scene.media MediaPlayer.

The text is from its open source code.

Field

intINDEFINITE
A value representing an effectively infinite number of playback cycles.

Constructor

MediaPlayer(@NamedArg("media") Media media)
Create a player for a specific media.

Method

ReadOnlyObjectPropertycurrentTimeProperty()
MediaExceptiongetError()
Retrieve the value of the #errorProperty error property or null if there is no error.
MediagetMedia()
Retrieves the Media instance being played.
DurationgetStartTime()
Retrieves the start time.
StatusgetStatus()
Retrieves the current player status.
DurationgetTotalDuration()
Retrieves the total playback duration including all cycles (repetitions).
voidpause()
Pauses the player.
voidplay()
Starts playing the media.
voidseek(Duration seekTime)
Seeks the player to a new playback time.
voidsetAutoPlay(boolean value)
Sets the #autoPlayProperty autoPlay property value.
voidsetCycleCount(int value)
Sets the cycle count.
voidsetOnEndOfMedia(Runnable value)
Sets the end of media event handler.
voidsetOnError(Runnable value)
Sets the event handler to be called when an error occurs.
voidsetOnMarker(EventHandler onMarker)
Sets the marker event handler.
voidsetOnPaused(Runnable value)
Sets the Status#PAUSED event handler.
voidsetOnPlaying(Runnable value)
Sets the Status#PLAYING event handler.
voidsetOnReady(Runnable value)
Sets the Status#READY event handler.
voidsetVolume(double value)
Sets the audio playback volume.
ReadOnlyObjectPropertystatusProperty()
ReadOnlyObjectPropertytotalDurationProperty()
DoublePropertyvolumeProperty()