DefaultAudioPlayerAgent
class DefaultAudioPlayerAgent( mediaPlayer: MediaPlayerInterface, messageSender: MessageSender, focusManager: SeamlessFocusManagerInterface, contextManager: ContextManagerInterface, playbackRouter: PlaybackRouter, playSynchronizer: PlaySynchronizerInterface, directiveSequencer: DirectiveSequencerInterface, directiveGroupProcessor: DirectiveGroupProcessorInterface, channelName: String, enableDisplayLifeCycleManagement: Boolean, audioPlayerTemplateHandler: AudioPlayerTemplateHandler?) : CapabilityAgent, SupportedInterfaceContextProvider, ChannelObserver, AudioPlayerAgentInterface, PlaybackHandler, MediaPlayerControlInterface.PlaybackEventListener, AudioPlayerLyricsDirectiveHandler.VisibilityController, AudioPlayerLyricsDirectiveHandler.PagingController, PlayStackManagerInterface.PlayContextProvider
Content copied to clipboard
Constructors
Link copied to clipboard
fun DefaultAudioPlayerAgent( mediaPlayer: MediaPlayerInterface, messageSender: MessageSender, focusManager: SeamlessFocusManagerInterface, contextManager: ContextManagerInterface, playbackRouter: PlaybackRouter, playSynchronizer: PlaySynchronizerInterface, directiveSequencer: DirectiveSequencerInterface, directiveGroupProcessor: DirectiveGroupProcessorInterface, channelName: String, enableDisplayLifeCycleManagement: Boolean, audioPlayerTemplateHandler: AudioPlayerTemplateHandler?)
Content copied to clipboard
Types
Link copied to clipboard
inner class AudioInfo( val payload: DefaultAudioPlayerAgent.PlayPayload, val directive: Directive, val playServiceId: String) : PlaySynchronizerInterface.SynchronizeObject
Content copied to clipboard
Link copied to clipboard
AudioPlayer's release rule:
Link copied to clipboard
Link copied to clipboard
data class PlayPayload( val sourceType: DefaultAudioPlayerAgent.SourceType?, val playServiceId: String, val cacheKey: String?, val audioItem: AudioItem, val playStackControl: PlayStackControl?)
Content copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
open override fun addListener(listener: AudioPlayerAgentInterface.Listener, requestCurrentState: Boolean)
Content copied to clipboard
Add a listener to be called when a state changed.
Link copied to clipboard
open override fun addOnDurationListener(listener: AudioPlayerAgentInterface.OnDurationListener, requestCurrentState: Boolean)
Content copied to clipboard
Add a listener to be called when duration retrieved
Link copied to clipboard
open override fun addOnPlaybackListener(listener: AudioPlayerAgentInterface.OnPlaybackListener)
Content copied to clipboard
Add a playback listener
Link copied to clipboard
open override fun controlPage(playServiceId: String, direction: Direction): Boolean
Content copied to clipboard
Link copied to clipboard
Notifies the display that has been cleared.
Link copied to clipboard
open override fun displayCardRendered(templateId: String, controller: AudioPlayerDisplayInterface.Controller?)
Content copied to clipboard
Notifies the display that has been rendered.
Link copied to clipboard
Notifies the display that has been render failed.
Link copied to clipboard
open override fun getPlayContext(): PlayStackManagerInterface.PlayContext?
Content copied to clipboard
Link copied to clipboard
This should be called when occur interaction(input event such as touch, drag, etc...) for display
Link copied to clipboard
Called on playback button is pressed.
Link copied to clipboard
Link copied to clipboard
open override fun onPlaybackError( id: SourceId, type: ErrorType, error: String)
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun provideState( contextSetter: ContextSetterInterface, namespaceAndName: NamespaceAndName, contextType: ContextType, stateRequestToken: Int)
Content copied to clipboard
Link copied to clipboard
open override fun removeListener(listener: AudioPlayerAgentInterface.Listener)
Content copied to clipboard
Remove a listener
Link copied to clipboard
open override fun removeOnDurationListener(listener: AudioPlayerAgentInterface.OnDurationListener)
Content copied to clipboard
Remove a listener
Link copied to clipboard
open override fun removeOnPlaybackListener(listener: AudioPlayerAgentInterface.OnPlaybackListener)
Content copied to clipboard
Remove a playback listener
Link copied to clipboard
Request the favorite command if supported.
Link copied to clipboard
open override fun requestRepeatCommand(current: AudioPlayerAgentInterface.RepeatMode)
Content copied to clipboard
Request the repeat command if supported.
Link copied to clipboard
Request the shuffle command if supported
Link copied to clipboard
open override fun setElementSelected( templateId: String, token: String, postback: String?, callback: DisplayInterface.OnElementSelectedCallback?): String
Content copied to clipboard
Each element has it's own token.
Link copied to clipboard
Set a presenter for lyrics
Link copied to clipboard
open override fun setRenderer(renderer: AudioPlayerDisplayInterface.Renderer?)
Content copied to clipboard
Set a renderer to interact with the display agent.
Link copied to clipboard
open override fun setRequestCommandHandler(handler: AudioPlayerAgentInterface.RequestCommandHandler)
Content copied to clipboard