Package 

Class DefaultStreamMediaSessionController

    • 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.