lightbulb_outline Help shape the future of the Google Play Console, Android Studio, and Firebase. Start survey

belongs to Maven artifact androidx.media:media:1.0.0-alpha3

MediaPlaylistAgent.PlaylistEventCallback

public static abstract class MediaPlaylistAgent.PlaylistEventCallback
extends Object

java.lang.Object
   ↳ 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

MediaPlaylistAgent.PlaylistEventCallback()

Public methods

void onPlaylistChanged(MediaPlaylistAgent playlistAgent, List<MediaItem2> list, MediaMetadata2 metadata)

Called when a playlist is changed.

void onPlaylistMetadataChanged(MediaPlaylistAgent playlistAgent, MediaMetadata2 metadata)

Called when a playlist metadata is changed.

void onRepeatModeChanged(MediaPlaylistAgent playlistAgent, int repeatMode)

Called when the repeat mode is changed.

void onShuffleModeChanged(MediaPlaylistAgent playlistAgent, int shuffleMode)

Called when the shuffle mode is changed.

Inherited methods

Public constructors

MediaPlaylistAgent.PlaylistEventCallback

public MediaPlaylistAgent.PlaylistEventCallback ()

Public methods

onPlaylistChanged

public void onPlaylistChanged (MediaPlaylistAgent playlistAgent, 
                List<MediaItem2> list, 
                MediaMetadata2 metadata)

Called when a playlist is changed.

Parameters
playlistAgent MediaPlaylistAgent: playlist agent for this event

list List: new playlist

metadata MediaMetadata2: new metadata

onPlaylistMetadataChanged

public void onPlaylistMetadataChanged (MediaPlaylistAgent playlistAgent, 
                MediaMetadata2 metadata)

Called when a playlist metadata is changed.

Parameters
playlistAgent MediaPlaylistAgent: playlist agent for this event

metadata MediaMetadata2: new metadata

onRepeatModeChanged

public void onRepeatModeChanged (MediaPlaylistAgent playlistAgent, 
                int repeatMode)

Called when the repeat mode is changed.

Parameters
playlistAgent MediaPlaylistAgent: playlist agent for this event

repeatMode int: repeat mode

onShuffleModeChanged

public void onShuffleModeChanged (MediaPlaylistAgent playlistAgent, 
                int shuffleMode)

Called when the shuffle mode is changed.

Parameters
playlistAgent MediaPlaylistAgent: playlist agent for this event

shuffleMode int: repeat mode