-
- All Implemented Interfaces:
-
io.getstream.video.android.core.notifications.handlers.StreamMediaSessionController
public class DefaultStreamMediaSessionController implements StreamMediaSessionController
Default implementation of the StreamMediaSessionController interface.
-
-
Constructor Summary
Constructors Constructor Description DefaultStreamMediaSessionController(StreamNotificationBuilderInterceptors interceptors, StreamNotificationUpdateInterceptors updateInterceptors)
-
Method Summary
Modifier and Type Method Description MediaSessionCompatprovideMediaSession(Application application, StreamCallId callId, String channelId, MediaSessionCompat.Callback callback)Create or get already created media session for the call. UnitinitialMetadata(Context context, MediaSessionCompat mediaSession, StreamCallId callId, MediaMetadataCompat.Builder metadataBuilder)Create the media session metadata. UnitinitialPlaybackState(Context context, MediaSessionCompat mediaSession, StreamCallId callId, PlaybackStateCompat.Builder playbackStateBuilder)Create the media session playback state. UnitupdateMetadata(Context context, MediaSessionCompat mediaSession, Call call, String callDisplayName, MediaMetadataCompat.Builder metadataBuilder)Update the media session metadata. UnitupdatePlaybackState(Context context, MediaSessionCompat mediaSession, Call call, String callDisplayName, PlaybackStateCompat.Builder playbackStateBuilder)Update the media session playback state. Unitclear(StreamCallId callId)Clear the media session for the call. -
-
Constructor Detail
-
DefaultStreamMediaSessionController
DefaultStreamMediaSessionController(StreamNotificationBuilderInterceptors interceptors, StreamNotificationUpdateInterceptors updateInterceptors)
-
-
Method Detail
-
provideMediaSession
MediaSessionCompat provideMediaSession(Application application, StreamCallId callId, String channelId, MediaSessionCompat.Callback callback)
Create or get already created media session for the call.
- Parameters:
application- The application context.callId- The call id.channelId- The channel id.
-
initialMetadata
Unit initialMetadata(Context context, MediaSessionCompat mediaSession, StreamCallId callId, MediaMetadataCompat.Builder metadataBuilder)
Create the media session metadata.
- Parameters:
callId- The call id.metadataBuilder- The metadata builder.
-
initialPlaybackState
Unit initialPlaybackState(Context context, MediaSessionCompat mediaSession, StreamCallId callId, PlaybackStateCompat.Builder playbackStateBuilder)
Create the media session playback state.
- Parameters:
callId- The call id.playbackStateBuilder- The playback state builder.
-
updateMetadata
Unit updateMetadata(Context context, MediaSessionCompat mediaSession, Call call, String callDisplayName, MediaMetadataCompat.Builder metadataBuilder)
Update the media session metadata.
- Parameters:
mediaSession- The media session.call- The call.callDisplayName- The call display name.metadataBuilder- The metadata builder.
-
updatePlaybackState
Unit updatePlaybackState(Context context, MediaSessionCompat mediaSession, Call call, String callDisplayName, PlaybackStateCompat.Builder playbackStateBuilder)
Update the media session playback state.
- Parameters:
mediaSession- The media session.call- The call.callDisplayName- The call display name.playbackStateBuilder- The playback state builder.
-
clear
Unit clear(StreamCallId callId)
Clear the media session for the call.
- Parameters:
callId- The call id.
-
-
-
-