public class PlayBinMediaPlayer extends PipelineMediaPlayer
pipeline
eventExecutor, playList
Constructor and Description |
---|
PlayBinMediaPlayer() |
PlayBinMediaPlayer(java.lang.String name,
java.util.concurrent.Executor eventExecutor) |
Modifier and Type | Method and Description |
---|---|
double |
getVolume()
Gets the current audio output volume.
|
boolean |
isPlaying()
Tests if this media player is currently playing a media file.
|
protected static java.net.URI |
parseURI(java.lang.String uri)
Parses the URI in the String.
|
void |
pause()
Pauses playback of a media file.
|
void |
play()
Starts or resumes playback of a media file.
|
void |
setAudioSink(Element sink)
Sets the sink element to use for audio output.
|
void |
setInputFile(java.io.File file)
Sets the current file to play.
|
void |
setURI(java.net.URI uri)
Sets the media file to play.
|
void |
setVideoSink(Element sink)
Sets the sink element to use for video output.
|
void |
setVolume(double volume)
Sets the audio output volume.
|
void |
stop()
Stops playback of a media file.
|
addMediaListener, getPipeline, removeMediaListener
enqueue, enqueue, fireEndOfMediaEvent, firePauseEvent, fireStartEvent, fireStopEvent, getMediaListeners, remove, setPlaylist
public PlayBinMediaPlayer(java.lang.String name, java.util.concurrent.Executor eventExecutor)
public PlayBinMediaPlayer()
public void setAudioSink(Element sink)
sink
- The sink to use for audio output.public void setVideoSink(Element sink)
sink
- The sink to use for video output.public boolean isPlaying()
public void pause()
public void play()
public void stop()
public void setURI(java.net.URI uri)
uri
- The URI that describes the location of the media file.public void setInputFile(java.io.File file)
file
- the File
to play.public void setVolume(double volume)
volume
- a number between 0.0 and 1.0 representing the percentage of
the maximum volume.public double getVolume()
protected static java.net.URI parseURI(java.lang.String uri)
This method will check if the uri is a file and return a valid URI for that file.
uri
- the string representation of the URI.URI