Class FXMediaPlayer

java.lang.Object
one.jpro.platform.media.player.impl.FXMediaPlayer
All Implemented Interfaces:
javafx.event.EventTarget, MediaEngine, MediaPlayer

public final class FXMediaPlayer extends Object
MediaPlayer implementation for the desktop/mobile.
Author:
Besmir Beqiri
  • Property Summary

    Properties
    Type
    Property
    Description
    javafx.beans.property.BooleanProperty
    Whether playing should start as soon as possible.
    javafx.beans.property.ReadOnlyIntegerProperty
    The number of completed playback cycles.
    javafx.beans.property.ReadOnlyDoubleProperty
    The current rate of playback regardless of settings.
    javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration>
    The current media playback time.
    javafx.beans.property.IntegerProperty
    The number of times the media will be played.
    javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration>
    The amount of time between the startTime and stopTime of this player.
    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 a MediaPlayerException if an error occurs.
    final javafx.beans.property.ReadOnlyObjectProperty<MediaSource>
    The media source for the current player.
    javafx.beans.property.BooleanProperty
    Whether 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 to PAUSED.
    final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>>
    Event handler invoked when the status changes to PLAYING.
    final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>>
    Event handler invoked when the status changes to READY.
    javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>>
    Event handler invoked when the player currentTime reaches stopTime and will be repeating.
    final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>>
    Event handler invoked when the status changes to STALLED.
    final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>>
    Event handler invoked when the status changes to STOPPED.
    javafx.beans.property.DoubleProperty
    The 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    javafx.beans.property.BooleanProperty
    Whether playing should start as soon as possible.
    javafx.event.EventDispatchChain
    buildEventDispatchChain(javafx.event.EventDispatchChain tail)
     
    javafx.beans.property.ReadOnlyIntegerProperty
    The number of completed playback cycles.
    javafx.beans.property.ReadOnlyDoubleProperty
    The current rate of playback regardless of settings.
    javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration>
    The current media playback time.
    javafx.beans.property.IntegerProperty
    The number of times the media will be played.
    javafx.beans.property.ReadOnlyObjectProperty<javafx.util.Duration>
    The amount of time between the startTime and stopTime of this player.
    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 a MediaPlayerException if an error occurs.
    final int
    Retrieves the index of the current cycle.
    double
    Gets the value of the currentRate property.
    javafx.util.Duration
    Gets the value of the currentTime property.
    int
    Gets the value of the cycleCount property.
    javafx.util.Duration
    Gets the value of the cycleDuration property.
    javafx.util.Duration
    Gets the value of the duration property.
    Retrieve the value of the error property or null if there is no error.
    javafx.scene.media.MediaPlayer
     
    Retrieves 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 the MediaPlayer.Status.PAUSED event handler.
    final javafx.event.EventHandler<MediaPlayerEvent>
    Retrieves the MediaPlayer.Status.PLAYING event handler.
    final javafx.event.EventHandler<MediaPlayerEvent>
    Retrieves the MediaPlayer.Status.READY event handler.
    final javafx.event.EventHandler<MediaPlayerEvent>
    Retrieves the repeat event handler.
    final javafx.event.EventHandler<MediaPlayerEvent>
    Retrieves the MediaPlayer.Status.STALLED event handler.
    final javafx.event.EventHandler<MediaPlayerEvent>
    Retrieves the MediaPlayer.Status.STOPPED event handler.
    double
    Gets the value of the rate property.
    javafx.util.Duration
    Gets the value of the startTime property.
    javafx.scene.media.MediaPlayer.Status
    Retrieves the current player status.
    javafx.util.Duration
    Gets the value of the stopTime property.
    javafx.util.Duration
    Gets the value of the totalDuration property.
    double
    Gets the value of the volume property.
    boolean
    Gets the value of the autoPlay property.
    boolean
    Gets the value of the mute property.
    final javafx.beans.property.ReadOnlyObjectProperty<MediaSource>
    The media source for the current player.
    javafx.beans.property.BooleanProperty
    Whether 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 to PAUSED.
    final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>>
    Event handler invoked when the status changes to PLAYING.
    final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>>
    Event handler invoked when the status changes to READY.
    javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>>
    Event handler invoked when the player currentTime reaches stopTime and will be repeating.
    final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>>
    Event handler invoked when the status changes to STALLED.
    final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<MediaPlayerEvent>>
    Event handler invoked when the status changes to STOPPED.
    void
    Pauses the player.
    void
    Starts playing the media.
    javafx.beans.property.DoubleProperty
    The rate at which the media should be played.
    void
    seek(javafx.util.Duration seekTime)
    Seeks the player to a new playback time.
    void
    setAutoPlay(boolean autoPlay)
    Sets the value of the autoPlay property.
    void
    setCycleCount(int cycleCount)
    Sets the value of the cycleCount property.
    void
    setMute(boolean value)
    Sets the value of the mute property.
    final void
    setOnEndOfMedia(javafx.event.EventHandler<MediaPlayerEvent> value)
    Sets the event handler invoked when the end of media is reached naturally.
    final void
    setOnError(javafx.event.EventHandler<MediaPlayerEvent> value)
    Sets the event handler to be called when an error occurs.
    final void
    setOnPaused(javafx.event.EventHandler<MediaPlayerEvent> value)
    Sets the MediaPlayer.Status.PAUSED event handler.
    final void
    setOnPlaying(javafx.event.EventHandler<MediaPlayerEvent> value)
    Sets the MediaPlayer.Status.PLAYING event handler.
    final void
    setOnReady(javafx.event.EventHandler<MediaPlayerEvent> value)
    Sets the MediaPlayer.Status.READY event handler.
    final void
    setOnRepeat(javafx.event.EventHandler<MediaPlayerEvent> value)
    Sets the repeat event handler.
    final void
    setOnStalled(javafx.event.EventHandler<MediaPlayerEvent> value)
    Sets the MediaPlayer.Status.STALLED event handler.
    final void
    setOnStopped(javafx.event.EventHandler<MediaPlayerEvent> value)
    Sets the MediaPlayer.Status.STOPPED event handler.
    void
    setRate(double value)
    Sets the value of the rate property.
    void
    setStartTime(javafx.util.Duration startTime)
    Sets the value of the startTime property.
    void
    setStopTime(javafx.util.Duration stopTime)
    Sets the value of the stopTime property.
    void
    setVolume(double value)
    Sets the value of the volume property.
    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.
    void
    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
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait