com.pspdfkit.ui.audio.AudioPlaybackController |
Controller given when entering audio playback mode.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | AudioPlaybackController.AudioPlaybackListener | Listener for audio playback events. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
addAudioPlaybackListener(AudioPlaybackController.AudioPlaybackListener listener)
Registers a
AudioPlaybackController.AudioPlaybackListener to get notified when audio playback state changes. | ||||||||||
abstract void |
exitAudioPlaybackMode()
Leaves playback mode.
| ||||||||||
abstract AudioModeManager |
getAudioModeManager()
Returns the audio mode manager from this controller.
| ||||||||||
abstract int |
getCurrentPosition()
Returns current playback position in milliseconds.
| ||||||||||
abstract int |
getDuration()
Returns total playback duration in milliseconds.
| ||||||||||
abstract boolean |
isReady()
Checks whether the media is ready to be played.
| ||||||||||
abstract boolean |
isResumed()
Checks whether the media playback is currently resumed.
| ||||||||||
abstract void |
pause()
Pauses playback of the media.
| ||||||||||
abstract void |
removeAudioPlaybackListener(AudioPlaybackController.AudioPlaybackListener listener)
Removes a previously registered
AudioPlaybackController.AudioPlaybackListener . | ||||||||||
abstract void |
resume()
Resumes playback of the media.
| ||||||||||
abstract void |
seekTo(int offsetMillis)
Seeks to a specified offset in the media.
| ||||||||||
abstract void |
toggle()
Toggles audio playback state.
|
Registers a AudioPlaybackController.AudioPlaybackListener
to get notified when audio playback state changes.
If the provider has been registered previously, this method will be a no-op.
listener | Listener to register. Must be non-null. |
---|
Leaves playback mode.
Returns the audio mode manager from this controller.
Returns current playback position in milliseconds.
Returns total playback duration in milliseconds.
Checks whether the media is ready to be played.
Checks whether the media playback is currently resumed.
Pauses playback of the media.
Removes a previously registered AudioPlaybackController.AudioPlaybackListener
. If the provider hasn't been
registered previously, this method will be a no-op.
listener | Listener to unregister. Must be non-null. |
---|
Resumes playback of the media.
Seeks to a specified offset in the media.
offsetMillis | Offset to seek to in milliseconds. |
---|
Toggles audio playback state.