org.gstreamer.media
public interface MediaPlayer
VideoPlayer
uses to play media files.Modifier and Type | Method and Description |
---|---|
void |
addMediaListener(MediaListener listener)
Adds a listener for media events
|
void |
enqueue(Collection<URI> playlist)
Adds a list of media files to the playlist.
|
void |
enqueue(URI uri)
Adds a uri to the playlist
|
Pipeline |
getPipeline()
Gets the
Pipeline that the MediaPlayer uses to play media. |
double |
getVolume() |
boolean |
isPlaying()
Tests if this media player is currently playing a media file.
|
void |
pause()
Pauses playing the currently playing media file.
|
void |
play()
Starts playing the media (as set by
setURI(java.net.URI) . |
void |
remove(URI uri)
Removes a file from the playlist.
|
void |
removeMediaListener(MediaListener listener)
Removes a listener for media events.
|
void |
setAudioSink(Element sink)
Sets the Element to use for audio output.
|
void |
setPlaylist(Collection<URI> playlist)
Replaces the current playlist with a new playlist.
|
void |
setURI(URI uri)
Sets the media file to play.
|
void |
setVideoSink(Element sink)
Sets the Element to use for video output.
|
void |
setVolume(double volume) |
void |
stop()
Stops playing the currently playing media file.
|
Pipeline getPipeline()
Pipeline
that the MediaPlayer uses to play media.void setAudioSink(Element sink)
sink
- The Element
to use for audio output.void setVideoSink(Element sink)
sink
- The Element
to use for video output.void setURI(URI uri)
uri
- The URI that describes the location of the media file.void play()
setURI(java.net.URI)
.void pause()
void stop()
boolean isPlaying()
void enqueue(URI uri)
uri
- The uri to add to the playlist.void enqueue(Collection<URI> playlist)
playlist
- The list of media files to add.void setPlaylist(Collection<URI> playlist)
playlist
- The new playlist.void remove(URI uri)
uri
- The uri to remove.void setVolume(double volume)
double getVolume()
void addMediaListener(MediaListener listener)
listener
- The MediaListener
to receive the events.void removeMediaListener(MediaListener listener)
listener
- The previously added MediaListener
.Copyright © 2014. All rights reserved.