ParticipantExtension


@ExperimentalAppActions
interface ParticipantExtension


The extension interface used to support notifying remote surfaces (automotive, watch, etc...) of state related to the Participants in the call.

This interface allows an application to notify remote surfaces of changes to Participant state. Additionally, this interface allows the application to support optional actions that use the participant state. These actions provide remote surfaces with the ability to request participant state updates based on user input and provide additional information about the state of specific participants.

Summary

Public functions

Unit
addKickParticipantSupport(
    onKickParticipant: suspend (Participant) -> Unit
)

Adds support for allowing the user to kick participants in the call using the remote surface.

RaiseHandState
addRaiseHandSupport(
    initialRaisedHands: List<Participant>,
    onHandRaisedChanged: suspend (Boolean) -> Unit
)

Adds support for notifying remote surfaces of the "raised hand" state of all Participants in the call.

suspend Unit

Update all of the remote surfaces that the active participant associated with this call has changed, if it exists.

suspend Unit
updateParticipants(newParticipants: Set<Participant>)

Update all of the remote surfaces that the Participants of this call have changed.

Public functions

addKickParticipantSupport

Added in 1.0.0-beta01
fun addKickParticipantSupport(
    onKickParticipant: suspend (Participant) -> Unit
): Unit

Adds support for allowing the user to kick participants in the call using the remote surface.

Parameters
onKickParticipant: suspend (Participant) -> Unit

The action to perform when the user requests to kick a participant. This operation should not return until the request has been processed.

addRaiseHandSupport

Added in 1.0.0-beta01
fun addRaiseHandSupport(
    initialRaisedHands: List<Participant> = emptyList(),
    onHandRaisedChanged: suspend (Boolean) -> Unit
): RaiseHandState

Adds support for notifying remote surfaces of the "raised hand" state of all Participants in the call.

Parameters
initialRaisedHands: List<Participant> = emptyList()

The initial List of Participants whose hands are raised, ordered from earliest raised hand to newest raised hand.

onHandRaisedChanged: suspend (Boolean) -> Unit

This is called when the user has requested to change their "raised hand" state on a remote surface. If true, this user has raised their hand. If false, this user has lowered their hand. This operation should not return until the request has been processed.

Returns
RaiseHandState

The interface used to update the current raised hand state of all Participants in the call.

updateActiveParticipant

Added in 1.0.0-beta01
suspend fun updateActiveParticipant(participant: Participant?): Unit

Update all of the remote surfaces that the active participant associated with this call has changed, if it exists.

The "active" participant is the participant that is currently taking focus and should be marked in UX as active or take a more prominent view to the user.

Parameters
participant: Participant?

the Participant that is marked as the active participant or null if there is no active participant

updateParticipants

Added in 1.0.0-beta01
suspend fun updateParticipants(newParticipants: Set<Participant>): Unit

Update all of the remote surfaces that the Participants of this call have changed.

Parameters
newParticipants: Set<Participant>

The new set of Participants associated with this call.