public interface AudioPlayer
Modifier and Type | Interface and Description |
---|---|
static interface |
AudioPlayer.Listener
The AudioPlayer.Listener provides methods for managing the lifecycle of an
AudioPlayer and its associated Audio content.
|
Modifier and Type | Method and Description |
---|---|
void |
enqueue(Audio audio)
Append the Audio to the audio queue.
|
void |
pause()
Pause the currently playing Audio.
|
void |
play()
Start playing the currently enqueued Audio.
|
void |
playAudio(Audio audio)
Empty the audio queue and immediately start playing the provided Audio.
|
void |
setListener(AudioPlayer.Listener listener)
Sets the listener for that AudioPlayer instance to receive various callback.
|
void |
stop()
Stop the currently playing Audio and empty the audio queue.
|
void play()
void playAudio(Audio audio)
audio
- The Audio to play.void pause()
void stop()
void enqueue(Audio audio)
audio
- The Audio to enqueue.void setListener(AudioPlayer.Listener listener)
listener
- The AudioPlayer listener.