Callback
An extended PillarboxMediaSession.Callback for the PillarboxMediaLibrarySession.
When you return LibraryResult with MediaItem media items, each item must have valid mediaId and specify MediaMetadata.isBrowsable and MediaMetadata.isPlayable in its mediaMetadata.
See also
Functions
Link copied to clipboard
open fun onAddMediaItems(mediaSession: PillarboxMediaSession, controller: MediaSession.ControllerInfo, mediaItems: MutableList<MediaItem>): ListenableFuture<MutableList<MediaItem>>
Link copied to clipboard
open fun onGetChildren(session: PillarboxMediaLibrarySession, browser: MediaSession.ControllerInfo, parentId: String, @IntRange(from = 0) page: Int, @IntRange(from = 1) pageSize: Int, params: MediaLibraryService.LibraryParams?): ListenableFuture<LibraryResult<ImmutableList<MediaItem>>>
Called when a PillarboxMediaBrowser requests the child media items of the given parent id.
Link copied to clipboard
open fun onGetItem(session: PillarboxMediaLibrarySession, browser: MediaSession.ControllerInfo, mediaId: String): ListenableFuture<LibraryResult<MediaItem>>
Called when a PillarboxMediaBrowser requests a MediaItem from mediaId.
Link copied to clipboard
open fun onGetLibraryRoot(session: PillarboxMediaLibrarySession, browser: MediaSession.ControllerInfo, params: MediaLibraryService.LibraryParams?): ListenableFuture<LibraryResult<MediaItem>>
Called when a PillarboxMediaBrowser requests the root MediaItem.
Link copied to clipboard
open fun onGetSearchResult(session: PillarboxMediaLibrarySession, browser: MediaSession.ControllerInfo, query: String, page: Int, pageSize: Int, params: MediaLibraryService.LibraryParams?): ListenableFuture<LibraryResult<ImmutableList<MediaItem>>>
Called when a PillarboxMediaBrowser requests the child media items of the given parent id.
Link copied to clipboard
open fun onSearch(session: PillarboxMediaLibrarySession, browser: MediaSession.ControllerInfo, query: String, params: MediaLibraryService.LibraryParams?): ListenableFuture<LibraryResult<Void>>
Called when a MediaBrowser requests a search.
Link copied to clipboard
open fun onSetMediaItems(mediaSession: PillarboxMediaSession, controller: MediaSession.ControllerInfo, mediaItems: MutableList<MediaItem>, startIndex: Int, startPositionMs: Long): ListenableFuture<MediaSession.MediaItemsWithStartPosition>