-
public interface StreamMediaSessionControllerController for managing media sessions.
-
-
Method Summary
Modifier and Type Method Description abstract MediaSessionCompatprovideMediaSession(Application application, StreamCallId callId, String channelId, MediaSessionCompat.Callback callback)Create or get already created media session for the call. abstract UnitinitialMetadata(Context context, MediaSessionCompat mediaSession, StreamCallId callId, MediaMetadataCompat.Builder metadataBuilder)Create the media session metadata. abstract UnitinitialPlaybackState(Context context, MediaSessionCompat mediaSession, StreamCallId callId, PlaybackStateCompat.Builder playbackStateBuilder)Create the media session playback state. abstract UnitupdateMetadata(Context context, MediaSessionCompat mediaSession, Call call, String callDisplayName, MediaMetadataCompat.Builder metadataBuilder)Update the media session metadata. abstract UnitupdatePlaybackState(Context context, MediaSessionCompat mediaSession, Call call, String callDisplayName, PlaybackStateCompat.Builder playbackStateBuilder)Update the media session playback state. abstract Unitclear(StreamCallId callId)Clear the media session for the call. -
-
Method Detail
-
provideMediaSession
abstract 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
abstract 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
abstract 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
abstract 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
abstract 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
abstract Unit clear(StreamCallId callId)
Clear the media session for the call.
- Parameters:
callId- The call id.
-
-
-
-