ParticipantExtensionRemote


@ExperimentalAppActions
interface ParticipantExtensionRemote


Interface used to allow the remote surface (automotive, watch, etc...) to know if the connected calling application supports the participant extension and optionally set up additional actions for the Participants in the call.

Actions allow the remote surface to display additional optional state regarding the Participants in the call and send action requests to the calling application to modify the state of supported actions.

Summary

Public functions

KickParticipantAction

Adds the ability for the user to request to kick Participants in the call.

RaiseHandAction
addRaiseHandAction(
    onRaisedHandsChanged: suspend (List<Participant>) -> Unit
)

Adds the "raise hand" action and provides the remote surface with the ability to display which Participants have their hands raised and an action to request to raise and lower their own hand.

Public properties

Boolean

Whether or not the participants extension is supported by the calling application.

Public functions

addKickParticipantAction

Added in 1.0.0-beta01
fun addKickParticipantAction(): KickParticipantAction

Adds the ability for the user to request to kick Participants in the call.

connectExtensions(call) {
val participantExtension = addParticipantExtension(
// consume participant changed events
)
val kickParticipantAction = participantExtension.addKickParticipantAction()

onConnected {
// extensions have been negotiated and actions are ready to be used
...
// kick a participant
val kickResult = kickParticipantAction.kickParticipant(participant)
}
}
Returns
KickParticipantAction

The action that is used to send kick Participant event requests to the remote Call.

addRaiseHandAction

fun addRaiseHandAction(
    onRaisedHandsChanged: suspend (List<Participant>) -> Unit
): RaiseHandAction

Adds the "raise hand" action and provides the remote surface with the ability to display which Participants have their hands raised and an action to request to raise and lower their own hand.

connectExtensions(call) {
val participantExtension = addParticipantExtension(
// consume participant changed events
)
// Initialize the raise hand action
val raiseHandAction = participantExtension.addRaiseHandAction { raisedHands ->
// consume changes of participants with their hands raised
}
onConnected {
// extensions have been negotiated and actions are ready to be used
...
// notify the remote that this user has changed their hand raised state
val raisedHandResult = raiseHandAction.setRaisedHandState(userHandRaisedState)
}
}

Note: Must be called during initialization before CallExtensionScope.onConnected is called.

Parameters
onRaisedHandsChanged: suspend (List<Participant>) -> Unit

Called when the List of Participants with their hands raised has changed, ordered from oldest raised hand to newest raised hand.

Returns
RaiseHandAction

The action that is used to determine support of this action and send raise hand event requests to the calling application.

Public properties

isSupported

Added in 1.0.0-beta01
val isSupportedBoolean

Whether or not the participants extension is supported by the calling application.

If true, then updates about Participants in the call will be notified. If false, then the remote doesn't support this extension and participants will not be notified to the caller nor will associated actions receive state updates.

Note: Must not be queried until after CallExtensionScope.onConnected is called.