Package 

Interface StreamMediaSessionController

    • Method Summary

      Modifier and Type Method Description
      abstract MediaSessionCompat provideMediaSession(Application application, StreamCallId callId, String channelId, MediaSessionCompat.Callback callback) Create or get already created media session for the call.
      abstract Unit initialMetadata(Context context, MediaSessionCompat mediaSession, StreamCallId callId, MediaMetadataCompat.Builder metadataBuilder) Create the media session metadata.
      abstract Unit initialPlaybackState(Context context, MediaSessionCompat mediaSession, StreamCallId callId, PlaybackStateCompat.Builder playbackStateBuilder) Create the media session playback state.
      abstract Unit updateMetadata(Context context, MediaSessionCompat mediaSession, Call call, String callDisplayName, MediaMetadataCompat.Builder metadataBuilder) Update the media session metadata.
      abstract Unit updatePlaybackState(Context context, MediaSessionCompat mediaSession, Call call, String callDisplayName, PlaybackStateCompat.Builder playbackStateBuilder) Update the media session playback state.
      abstract Unit clear(StreamCallId callId) Clear the media session for the call.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.