APIdia Launch Partner
Top Description Methods
com.sun.media.jfxmedia.events

public Interface PlayerStateListener

Known Direct Implementers
com.sun.media.jfxmediaimpl.NativeMediaAudioClipPlayer, javafx.scene.media.MediaPlayer._PlayerStateListener

Notifications related to playing media are sent to PlayerStateListener.

Method Summary

Modifier and TypeMethod and Description
public void
onFinish(PlayerStateEvent evt)

The finish state indicates playback has completed playback to the end.

public void
onHalt(PlayerStateEvent evt)

The error notification provides information on any error during playback.

public void
onPause(PlayerStateEvent evt)

The pause state indicates playback has paused.

public void
onPlaying(PlayerStateEvent evt)

The play state indicates the media is beginning to play.

public void
onReady(PlayerStateEvent evt)

The ready state indicates the media is loaded.

public void
public void
onStop(PlayerStateEvent evt)

The stop state indicates playback has paused and presentation time has been reset back to 0.

Method Detail

onFinishback to summary
public void onFinish(PlayerStateEvent evt)

The finish state indicates playback has completed playback to the end.

onHaltback to summary
public void onHalt(PlayerStateEvent evt)

The error notification provides information on any error during playback.

onPauseback to summary
public void onPause(PlayerStateEvent evt)

The pause state indicates playback has paused.

onPlayingback to summary
public void onPlaying(PlayerStateEvent evt)

The play state indicates the media is beginning to play.

onReadyback to summary
public void onReady(PlayerStateEvent evt)

The ready state indicates the media is loaded. For best results, developers should wait on OnReady() before playing a media.

onStallback to summary
public void onStall(PlayerStateEvent evt)
onStopback to summary
public void onStop(PlayerStateEvent evt)

The stop state indicates playback has paused and presentation time has been reset back to 0. If the player is asked to play() again, playback begins from the beginning.