# Index

C D E G I M O S
All Classes and Interfaces|All Packages|Constant Field Values

## C

com.castlabs.sdk.mediasession - package com.castlabs.sdk.mediasession

## D

disableMediaSession(PlayerController) - Static method in class com.castlabs.sdk.mediasession.MediaSessionPlugin
  Closes Media Session

## E

enableArtworkUriPlaceholder - Static variable in class com.castlabs.sdk.mediasession.MediaSessionPlugin
  If set to `true`, a placeholder artwork URI will be used when no artwork URI is provided in metadata.
enableMediaSession(PlayerController) - Static method in class com.castlabs.sdk.mediasession.MediaSessionPlugin
  Creates and enables Media Session with default configuration.
enableMediaSession(PlayerController, MediaSessionBuilder) - Static method in class com.castlabs.sdk.mediasession.MediaSessionPlugin
  Creates and enables Media Session with custom configuration.

## G

getId() - Method in class com.castlabs.sdk.mediasession.MediaSessionPlugin
getMediaSession(PlayerController) - Static method in class com.castlabs.sdk.mediasession.MediaSessionPlugin
  Gets Media Session instance e.g.

## I

isEnabled(PlayerController) - Static method in class com.castlabs.sdk.mediasession.MediaSessionPlugin
  Checks if Media Session is enabled

## M

MediaSessionBuilder - Class in com.castlabs.sdk.mediasession
  Media Session builder allowing customizations
MediaSessionBuilder() - Constructor for class com.castlabs.sdk.mediasession.MediaSessionBuilder
  Constructs default MediaSessionBuilder
MediaSessionBuilder.Listener - Interface in com.castlabs.sdk.mediasession
  A listener to provide media session events.
MediaSessionPlugin - Class in com.castlabs.sdk.mediasession
  MediaSessionPlugin integrates Castlabs Player SDK with AndroidX Media3 session APIs.
MediaSessionPlugin() - Constructor for class com.castlabs.sdk.mediasession.MediaSessionPlugin
  Constructs default MediaSessionPlugin
METADATA_KEY_ARTIST - Static variable in class com.castlabs.sdk.mediasession.MediaSessionPlugin
  Metadata key used to set `MediaMetadata.artist`
METADATA_KEY_ARTWORK_URI - Static variable in class com.castlabs.sdk.mediasession.MediaSessionPlugin
  Metadata key used to set `MediaMetadata.artworkUri`
METADATA_KEY_TITLE - Static variable in class com.castlabs.sdk.mediasession.MediaSessionPlugin
  Metadata key used to set `MediaMetadata.title`

## O

onAddMediaItems(MediaSession, MediaSession.ControllerInfo, List<MediaItem>) - Method in interface com.castlabs.sdk.mediasession.MediaSessionBuilder.Listener
  Called when media items are added.
onConnect(MediaSession, MediaSession.ControllerInfo) - Method in interface com.castlabs.sdk.mediasession.MediaSessionBuilder.Listener
  Called when a controller is about to connect the session.
onCustomCommand(MediaSession, MediaSession.ControllerInfo, SessionCommand, Bundle) - Method in interface com.castlabs.sdk.mediasession.MediaSessionBuilder.Listener
  Called when a custom command is received.
onDisconnected(MediaSession, MediaSession.ControllerInfo) - Method in interface com.castlabs.sdk.mediasession.MediaSessionBuilder.Listener
  Called when a controller is disconnected.
onGetChildren(MediaLibraryService.MediaLibrarySession, MediaSession.ControllerInfo, String, int, int, MediaLibraryService.LibraryParams) - Method in interface com.castlabs.sdk.mediasession.MediaSessionBuilder.Listener
  Called to get children of the given parent ID.
onGetItem(MediaLibraryService.MediaLibrarySession, MediaSession.ControllerInfo, String) - Method in interface com.castlabs.sdk.mediasession.MediaSessionBuilder.Listener
  Called to get an item with the given media ID.
onGetLibraryRoot(MediaLibraryService.MediaLibrarySession, MediaSession.ControllerInfo, MediaLibraryService.LibraryParams) - Method in interface com.castlabs.sdk.mediasession.MediaSessionBuilder.Listener
  Called to get the library root.
onGetSearchResult(MediaLibraryService.MediaLibrarySession, MediaSession.ControllerInfo, String, int, int, MediaLibraryService.LibraryParams) - Method in interface com.castlabs.sdk.mediasession.MediaSessionBuilder.Listener
  Called to get search results.
onGetSession(MediaSession.ControllerInfo) - Method in class com.castlabs.sdk.mediasession.SessionPlayerService
onMediaButtonEvent(MediaSession, MediaSession.ControllerInfo, Intent) - Method in interface com.castlabs.sdk.mediasession.MediaSessionBuilder.Listener
  Called when a media button event is received.
onPlaybackResumption(MediaSession, MediaSession.ControllerInfo) - Method in interface com.castlabs.sdk.mediasession.MediaSessionBuilder.Listener
  Called when playback resumption is requested.
onPlayerInteractionFinished(MediaSession, MediaSession.ControllerInfo, Player.Commands) - Method in interface com.castlabs.sdk.mediasession.MediaSessionBuilder.Listener
  Called when player interaction is finished.
onPostConnect(MediaSession, MediaSession.ControllerInfo) - Method in interface com.castlabs.sdk.mediasession.MediaSessionBuilder.Listener
  Called after a connection is established.
onSearch(MediaLibraryService.MediaLibrarySession, MediaSession.ControllerInfo, String, MediaLibraryService.LibraryParams) - Method in interface com.castlabs.sdk.mediasession.MediaSessionBuilder.Listener
  Called when a search is performed.
onSetMediaItems(MediaSession, MediaSession.ControllerInfo, List<MediaItem>, int, long) - Method in interface com.castlabs.sdk.mediasession.MediaSessionBuilder.Listener
  Called when media items are set.
onSetRating(MediaSession, MediaSession.ControllerInfo, Rating) - Method in interface com.castlabs.sdk.mediasession.MediaSessionBuilder.Listener
  Called when a rating is set for the current media item.
onSetRating(MediaSession, MediaSession.ControllerInfo, String, Rating) - Method in interface com.castlabs.sdk.mediasession.MediaSessionBuilder.Listener
  Called when a rating is set for a specific media item.
onSubscribe(MediaLibraryService.MediaLibrarySession, MediaSession.ControllerInfo, String, MediaLibraryService.LibraryParams) - Method in interface com.castlabs.sdk.mediasession.MediaSessionBuilder.Listener
  Called when a subscription to a parent ID is added.
onUnsubscribe(MediaLibraryService.MediaLibrarySession, MediaSession.ControllerInfo, String) - Method in interface com.castlabs.sdk.mediasession.MediaSessionBuilder.Listener
  Called when a subscription to a parent ID is removed.

## S

SessionPlayerService - Class in com.castlabs.sdk.mediasession
  Implementation of `MediaSessionService` that manages media sessions and notifications for the player.
SessionPlayerService() - Constructor for class com.castlabs.sdk.mediasession.SessionPlayerService
  Default constructor.
setCommandButtons(ArrayList<CommandButton>) - Method in class com.castlabs.sdk.mediasession.MediaSessionBuilder
  Sets custom command buttons that will be shown in the media style notification.
setCustomMediaSessionServiceClass(Class<? extends MediaSessionService>) - Method in class com.castlabs.sdk.mediasession.MediaSessionBuilder
  Sets a custom media session service class.
setFastForwardIncrementMs(int) - Method in class com.castlabs.sdk.mediasession.MediaSessionBuilder
  Sets the fast forward increment in milliseconds
setListener(MediaSessionBuilder.Listener) - Method in class com.castlabs.sdk.mediasession.MediaSessionBuilder
  Sets a listener for receiving media session events.
setPlayerCommands(Player.Commands) - Method in class com.castlabs.sdk.mediasession.MediaSessionBuilder
  Sets available player commands for the session.
setRewindIncrementMs(int) - Method in class com.castlabs.sdk.mediasession.MediaSessionBuilder
  Sets the rewind increment in milliseconds
setSessionActivity(PendingIntent) - Method in class com.castlabs.sdk.mediasession.MediaSessionBuilder
  Sets a `PendingIntent` to launch an `Activity` for the `MediaSession`.
setSessionCommands(SessionCommands) - Method in class com.castlabs.sdk.mediasession.MediaSessionBuilder
  Sets custom session commands for the session.

C D E G I M O S
All Classes and Interfaces|All Packages|Constant Field Values