@Deprecated public class JavaFxMediaPlayer extends java.lang.Object implements SoundPlayer
| Modifier and Type | Field and Description |
|---|---|
private ListenerList<AudioListener> |
listeners
Deprecated.
|
private javafx.scene.media.MediaPlayer |
mediaPlayer
Deprecated.
|
| Constructor and Description |
|---|
JavaFxMediaPlayer()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAudioListener(AudioListener listener)
Deprecated.
Adds a listener that will be notified of audio playback events.
|
static void |
initFxPlatform()
Deprecated.
Initializes the JavaFX platform runtime.
|
void |
pause(AudioPlayer.Execute command,
AudioPlayer.State stateChange,
java.net.URL playingUrl)
Deprecated.
Ask player to pause the current playing media.
|
void |
play(AudioPlayer.Execute command,
AudioPlayer.State stateChange,
java.net.URL playingUrl)
Deprecated.
Ask player to play a new media.
|
boolean |
playing(AudioPlayer.Execute command)
Deprecated.
Method called when a media is being played.
|
double |
position()
Deprecated.
Returns the media playback position, in seconds.
|
double |
speed()
Deprecated.
Returns the media playback speed ratio.
|
private final ListenerList<AudioListener> listeners
private javafx.scene.media.MediaPlayer mediaPlayer
JavaFxMediaPlayer()
public static void initFxPlatform() throws java.lang.InterruptedException
java.lang.InterruptedException - if the current thread is interrupted while waitingpublic void play(AudioPlayer.Execute command, AudioPlayer.State stateChange, java.net.URL playingUrl) throws AudioException, java.io.IOException
SoundPlayerplay in interface SoundPlayercommand - Command containing media informationstateChange - the previous stateplayingUrl - the currently playing URL, if anyAudioException - if an audio error occursjava.io.IOException - if an I/O error occurspublic void pause(AudioPlayer.Execute command, AudioPlayer.State stateChange, java.net.URL playingUrl) throws AudioException, java.io.IOException
SoundPlayerpause in interface SoundPlayercommand - Command containing media informationstateChange - the previous stateplayingUrl - the currently playing URL, if anyAudioException - if an audio error occursjava.io.IOException - if an I/O error occurspublic boolean playing(AudioPlayer.Execute command) throws AudioException, java.io.IOException, java.lang.InterruptedException
SoundPlayerplaying in interface SoundPlayercommand - Command containing media informationtrue if the playing call was blocking, and the playback is finished when this method returnsAudioException - if an audio error occursjava.io.IOException - if an I/O error occursjava.lang.InterruptedException - if the play is interruptedpublic double position()
SoundPlayerposition in interface SoundPlayerpublic double speed()
SoundPlayerspeed in interface SoundPlayerpublic void addAudioListener(AudioListener listener)
SoundPlayeraddAudioListener in interface SoundPlayerlistener - audio listener