Package com.castlabs.sdk.mediasession
Interface SessionCallbackBuilder.MediaItemProvider
- All Known Implementing Classes:
SessionCallbackBuilder.MediaIdMediaItemProvider
- Enclosing class:
SessionCallbackBuilder
public static interface SessionCallbackBuilder.MediaItemProvider
Provides the
MediaItem
.-
Method Summary
Modifier and TypeMethodDescriptionandroidx.media2.common.MediaItem
onCreateMediaItem
(androidx.media2.session.MediaSession session, androidx.media2.session.MediaSession.ControllerInfo controllerInfo, String mediaId) Called whenMediaSession.SessionCallback.onCreateMediaItem(MediaSession, ControllerInfo, String)
is called.
-
Method Details
-
onCreateMediaItem
@Nullable androidx.media2.common.MediaItem onCreateMediaItem(androidx.media2.session.MediaSession session, androidx.media2.session.MediaSession.ControllerInfo controllerInfo, String mediaId) Called whenMediaSession.SessionCallback.onCreateMediaItem(MediaSession, ControllerInfo, String)
is called.- Parameters:
session
- The media session.controllerInfo
- TheMediaSession.ControllerInfo
for the controller that has requested to create the item.- Returns:
- A new
MediaItem
thatSessionPlayerConnector
can play. - See Also:
-