Class WebMediaPlayer

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

public final class WebMediaPlayer extends Object implements WebMediaEngine
MediaPlayer implementation for the web.
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.ReadOnlyObjectProperty<WebReadyState>
     
    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
    WebMediaPlayer(com.jpro.webapi.WebAPI webAPI, MediaSource mediaSource)
     
  • 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
    Retrieves the current media time.
    int
    Retrieves the cycle count.
    javafx.util.Duration
    Retrieves the cycle duration in seconds.
    javafx.util.Duration
    Gets the duration for the given media source.
    Retrieve the value of the error property or null if there is no error.
    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.
    Gets the value of the readyState 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
    Retrieves the total playback duration including all cycles (repetitions).
    com.jpro.webapi.JSVariable
    Returns the video element used to both play and record media on the browser.
    double
    Gets the value of the volume property.
    com.jpro.webapi.WebAPI
    Returns the WebAPI instance.
    boolean
    Retrieves the autoPlay property value.
    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.
    javafx.beans.property.ReadOnlyObjectProperty<WebReadyState>
     
    void
    seek(javafx.util.Duration seekTime)
    Seeks the player to a new playback time.
    void
    setAutoPlay(boolean value)
    Sets the autoPlay property value.
    void
    setCycleCount(int value)
    Sets the cycle count.
    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 value)
    Sets the value of the startTime property.
    void
    setStopTime(javafx.util.Duration value)
    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