PlaylistEventCallback

abstract class PlaylistEventCallback
kotlin.Any
   ↳ androidx.media.MediaPlaylistAgent.PlaylistEventCallback

A callback class to receive notifications for events on the media player. See MediaPlaylistAgent#registerPlaylistEventCallback(Executor, PlaylistEventCallback) to register this callback.

Summary

Public constructors

Public methods
open Unit

Called when a playlist metadata is changed.

open Unit
onRepeatModeChanged(playlistAgent: MediaPlaylistAgent, repeatMode: Int)

Called when the repeat mode is changed.

open Unit
onShuffleModeChanged(playlistAgent: MediaPlaylistAgent, shuffleMode: Int)

Called when the shuffle mode is changed.

open Unit

Called when a playlist is changed.

Public constructors

<init>

PlaylistEventCallback()

Public methods

onPlaylistMetadataChanged

open fun onPlaylistMetadataChanged(playlistAgent: MediaPlaylistAgent, metadata: MediaMetadata2?): Unit

Called when a playlist metadata is changed.

Parameters
playlistAgent MediaPlaylistAgent: playlist agent for this event
metadata MediaPlaylistAgent: new metadata

onRepeatModeChanged

open fun onRepeatModeChanged(playlistAgent: MediaPlaylistAgent, repeatMode: Int): Unit

Called when the repeat mode is changed.

Parameters
playlistAgent MediaPlaylistAgent: playlist agent for this event
repeatMode MediaPlaylistAgent: repeat mode

onShuffleModeChanged

open fun onShuffleModeChanged(playlistAgent: MediaPlaylistAgent, shuffleMode: Int): Unit

Called when the shuffle mode is changed.

Parameters
playlistAgent MediaPlaylistAgent: playlist agent for this event
shuffleMode MediaPlaylistAgent: repeat mode

onPlaylistChanged

open fun onPlaylistChanged(playlistAgent: MediaPlaylistAgent, list: MutableList<MediaItem2!>, metadata: MediaMetadata2?): Unit

Called when a playlist is changed.

Parameters
playlistAgent MediaPlaylistAgent: playlist agent for this event
list MediaPlaylistAgent: new playlist
metadata MediaPlaylistAgent: new metadata