AudioPlayerAgentInterface

interface AudioPlayerAgentInterface : AudioPlayerDisplayInterface

Interface for AudioPlayer Capability Agent

Types

Link copied to clipboard
data class Context(    val audioItemId: String,     val templateId: String,     val audioItemTemplate: String?,     val offset: Long,     val dialogRequestId: String)
Link copied to clipboard
interface Listener

Interface of a listener to be called when there has been an change of state

Link copied to clipboard
interface OnDurationListener
Link copied to clipboard
interface OnPlaybackListener

Listener to be called when occur a playback event.

Link copied to clipboard
enum RepeatMode : Enum<AudioPlayerAgentInterface.RepeatMode>
Link copied to clipboard
interface RequestCommandHandler
Link copied to clipboard
enum State : Enum<AudioPlayerAgentInterface.State>
Link copied to clipboard
enum StopReason : Enum<AudioPlayerAgentInterface.StopReason>

Functions

Link copied to clipboard
abstract fun addListener(listener: AudioPlayerAgentInterface.Listener, requestCurrentState: Boolean = false)

Add a listener to be called when a state changed.

Link copied to clipboard
abstract fun addOnDurationListener(listener: AudioPlayerAgentInterface.OnDurationListener, requestCurrentState: Boolean = false)

Add a listener to be called when duration retrieved

Link copied to clipboard
abstract fun addOnPlaybackListener(listener: AudioPlayerAgentInterface.OnPlaybackListener)

Add a playback listener

Link copied to clipboard
abstract fun displayCardCleared(templateId: String)

Notifies the display that has been cleared.

Link copied to clipboard
abstract fun displayCardRendered(templateId: String, controller: AudioPlayerDisplayInterface.Controller?)

Notifies the display that has been rendered.

Link copied to clipboard
abstract fun displayCardRenderFailed(templateId: String)

Notifies the display that has been render failed.

Link copied to clipboard
abstract fun getOffset(unit: TimeUnit = TimeUnit.SECONDS): Long

Gets the current playback offset

Link copied to clipboard
abstract fun next()

Starts next playback if available

Link copied to clipboard
abstract fun notifyUserInteractionOnDisplay(templateId: String)

This should be called when occur interaction(input event such as touch, drag, etc...) for display

Link copied to clipboard
abstract fun pause()

Pauses playback

Link copied to clipboard
abstract fun play()

Starts or resumes playback.

Link copied to clipboard
abstract fun prev()

Starts previous playback if available

Link copied to clipboard
abstract fun removeListener(listener: AudioPlayerAgentInterface.Listener)

Remove a listener

Link copied to clipboard
abstract fun removeOnDurationListener(listener: AudioPlayerAgentInterface.OnDurationListener)

Remove a listener

Link copied to clipboard
abstract fun removeOnPlaybackListener(listener: AudioPlayerAgentInterface.OnPlaybackListener)

Remove a playback listener

Link copied to clipboard
abstract fun requestFavoriteCommand(current: Boolean)

Request the favorite command if supported.

Link copied to clipboard
abstract fun requestRepeatCommand(current: AudioPlayerAgentInterface.RepeatMode)

Request the repeat command if supported.

Link copied to clipboard
abstract fun requestShuffleCommand(current: Boolean)

Request the shuffle command if supported

Link copied to clipboard
abstract fun seek(offsetInMilliseconds: Long)

Seeks to specified time position

Link copied to clipboard
abstract fun setElementSelected(    templateId: String,     token: String,     postback: String? = null,     callback: DisplayInterface.OnElementSelectedCallback? = null): String

Each element has it's own token.

Link copied to clipboard
abstract fun setLyricsPresenter(presenter: LyricsPresenter?)

Set a presenter for lyrics

Link copied to clipboard
abstract fun setRenderer(renderer: AudioPlayerDisplayInterface.Renderer?)

Set a renderer to interact with the display agent.

Link copied to clipboard
abstract fun setRequestCommandHandler(handler: AudioPlayerAgentInterface.RequestCommandHandler)
Link copied to clipboard
abstract fun stop()

Stops playback

Inheritors

Link copied to clipboard