Share via


CallAdapterCallOperations interface

Functionality for managing the current call.

Properties

sendRealTimeText

Send real time text

Methods

addParticipant(CommunicationUserIdentifier)
addParticipant(PhoneNumberIdentifier, AddPhoneNumberOptions)

Add a participant to the call.

createStreamView(string, VideoStreamOptions)

Create the html view for a stream.

createTogetherModeStreamView(TogetherModeStreamOptions)

Create the html view for a stream.

disposeLocalVideoStreamView()

Dispose the html view for a local video stream

disposeRemoteVideoStreamView(string)

Dispose the html view for a remote video stream

disposeScreenShareStreamView(string)

Dispose the html view for a screen share stream

disposeStreamView(string, VideoStreamOptions)

Dispose the html view for a stream.

disposeTogetherModeStreamView()

Dispose the html view for a stream.

forbidAudio(string[])

Forbid Teams meeting attendees audio by their user ids.

forbidOthersAudio()

Forbid Teams meeting audio.

forbidOthersVideo()

Forbid Teams meeting video.

forbidVideo(string[])

Forbid Teams meeting attendees video by their user ids.

holdCall()

Holds the call.

leaveCall(boolean)

Leave the call

lowerHand()

lower hand for current user

mute()

Mute the current user during the call or disable microphone locally

muteAllRemoteParticipants()

Mute All participants

muteParticipant(string)

Mute a participant

onReactionClick(Reaction)

Send reaction emoji

permitAudio(string[])

Permit Teams meeting attendees audio by their user ids.

permitOthersAudio()

Permit Teams meeting audio.

permitOthersVideo()

Permit Teams meeting video.

permitVideo(string[])

Permit Teams meeting attendees audio by their user ids.

raiseHand()

Raise hand for current user

removeParticipant(CommunicationIdentifier)

Remove a participant from the call.

removeParticipant(string)

Remove a participant from the call.

resumeCall()

Resumes the call from a LocalHold state.

returnFromBreakoutRoom()

Return to origin call of breakout room

sendDtmfTone(DtmfTone)

send dtmf tone to another participant in a 1:1 PSTN call

setCaptionLanguage(string)

Function to set caption language

setSpokenLanguage(string)

Function to set spoken language

setTogetherModeSceneSize(number, number)

Recalculate the seating positions for together mode.

startCamera(VideoStreamOptions)

Start the camera This method will start rendering a local camera view when the call is not active

startCaptions(StartCaptionsAdapterOptions)

Function to Start captions

startNoiseSuppressionEffect()

Start the noise suppression effect.

startScreenShare()

Start sharing the screen during a call.

startSpotlight(string[])

Start spotlight for local and remote participants by their user ids. If no array of user ids is passed then action is performed on local participant.

startTogetherMode()

Start Together mode.

startVideoBackgroundEffect(VideoBackgroundEffect)

Start the video background effect.

stopAllSpotlight()

Stop all spotlights

stopCamera()

Stop the camera This method will stop rendering a local camera view when the call is not active

stopCaptions(StopCaptionsAdapterOptions)

Funtion to stop captions

stopNoiseSuppressionEffect()

Stop the noise suppression effect.

stopScreenShare()

Stop sharing the screen

stopSpotlight(string[])

Stop spotlight for local and remote participants by their user ids. If no array of user ids is passed then action is performed on local participant.

stopVideoBackgroundEffects()

Stop the video background effect.

submitSurvey(CallSurvey)

Send the end of call survey result

unmute()

Unmute the current user during the call or enable microphone locally

updateBackgroundPickerImages(VideoBackgroundImage[])

Override the background picker images for background replacement effect.

updateSelectedVideoBackgroundEffect(VideoBackgroundEffect)

Update the selected video background effect.

Property Details

sendRealTimeText

Send real time text

sendRealTimeText: (text: string, isFinalized: boolean) => Promise<void>

Property Value

(text: string, isFinalized: boolean) => Promise<void>

Method Details

addParticipant(CommunicationUserIdentifier)

function addParticipant(participant: CommunicationUserIdentifier): Promise<void>

Parameters

Returns

Promise<void>

addParticipant(PhoneNumberIdentifier, AddPhoneNumberOptions)

Add a participant to the call.

function addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void>

Parameters

participant
PhoneNumberIdentifier

Returns

Promise<void>

createStreamView(string, VideoStreamOptions)

Create the html view for a stream.

function createStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void | CreateVideoStreamViewResult>

Parameters

remoteUserId

string

Id of the participant to render, leave it undefined to create the local camera view

options
VideoStreamOptions

Options to control how video streams are rendered <xref:%40azure%2Fcommunication-calling%23VideoStreamOptions>

Returns

Promise<void | CreateVideoStreamViewResult>

Remarks

This method is implemented for composite

createTogetherModeStreamView(TogetherModeStreamOptions)

Create the html view for a stream.

function createTogetherModeStreamView(options?: TogetherModeStreamOptions): Promise<void | TogetherModeStreamViewResult>

Parameters

options
TogetherModeStreamOptions

Options to control how video streams are rendered <xref:%40azure%2Fcommunication-calling%23VideoStreamOptions>

Returns

Remarks

This method is implemented for composite

disposeLocalVideoStreamView()

Dispose the html view for a local video stream

function disposeLocalVideoStreamView(): Promise<void>

Returns

Promise<void>

disposeRemoteVideoStreamView(string)

Dispose the html view for a remote video stream

function disposeRemoteVideoStreamView(remoteUserId: string): Promise<void>

Parameters

remoteUserId

string

Id of the participant to dispose

Returns

Promise<void>

disposeScreenShareStreamView(string)

Dispose the html view for a screen share stream

function disposeScreenShareStreamView(remoteUserId: string): Promise<void>

Parameters

remoteUserId

string

Id of the participant to dispose the screen share stream view for.

Returns

Promise<void>

Remarks

this method is implemented for composite

disposeStreamView(string, VideoStreamOptions)

Warning

This API is now deprecated.

Use disposeRemoteVideoStreamView, disposeLocalVideoStreamView and disposeRemoteVideoStreamView instead.

Dispose the html view for a stream.

function disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>

Parameters

remoteUserId

string

Id of the participant to render, leave it undefined to dispose the local camera view

options
VideoStreamOptions

Options to control how video streams are rendered <xref:%40azure%2Fcommunication-calling%23VideoStreamOptions>

Returns

Promise<void>

Remarks

This method is implemented for composite

disposeTogetherModeStreamView()

Dispose the html view for a stream.

function disposeTogetherModeStreamView(): Promise<void>

Returns

Promise<void>

Remarks

This method is implemented for composite

forbidAudio(string[])

Forbid Teams meeting attendees audio by their user ids.

function forbidAudio(userIds: string[]): Promise<void>

Parameters

userIds

string[]

Returns

Promise<void>

forbidOthersAudio()

Forbid Teams meeting audio.

function forbidOthersAudio(): Promise<void>

Returns

Promise<void>

forbidOthersVideo()

Forbid Teams meeting video.

function forbidOthersVideo(): Promise<void>

Returns

Promise<void>

forbidVideo(string[])

Forbid Teams meeting attendees video by their user ids.

function forbidVideo(userIds: string[]): Promise<void>

Parameters

userIds

string[]

Returns

Promise<void>

holdCall()

Holds the call.

function holdCall(): Promise<void>

Returns

Promise<void>

leaveCall(boolean)

Leave the call

function leaveCall(forEveryone?: boolean): Promise<void>

Parameters

forEveryone

boolean

Whether to remove all participants when leaving

Returns

Promise<void>

lowerHand()

lower hand for current user

function lowerHand(): Promise<void>

Returns

Promise<void>

mute()

Mute the current user during the call or disable microphone locally

function mute(): Promise<void>

Returns

Promise<void>

muteAllRemoteParticipants()

Mute All participants

function muteAllRemoteParticipants(): Promise<void>

Returns

Promise<void>

muteParticipant(string)

Mute a participant

function muteParticipant(userId: string): Promise<void>

Parameters

userId

string

Id of the participant to mute

Returns

Promise<void>

onReactionClick(Reaction)

Send reaction emoji

function onReactionClick(reaction: Reaction): Promise<void>

Parameters

reaction
Reaction

Returns

Promise<void>

permitAudio(string[])

Permit Teams meeting attendees audio by their user ids.

function permitAudio(userIds: string[]): Promise<void>

Parameters

userIds

string[]

Returns

Promise<void>

permitOthersAudio()

Permit Teams meeting audio.

function permitOthersAudio(): Promise<void>

Returns

Promise<void>

permitOthersVideo()

Permit Teams meeting video.

function permitOthersVideo(): Promise<void>

Returns

Promise<void>

permitVideo(string[])

Permit Teams meeting attendees audio by their user ids.

function permitVideo(userIds: string[]): Promise<void>

Parameters

userIds

string[]

Returns

Promise<void>

raiseHand()

Raise hand for current user

function raiseHand(): Promise<void>

Returns

Promise<void>

removeParticipant(CommunicationIdentifier)

Remove a participant from the call.

function removeParticipant(participant: CommunicationIdentifier): Promise<void>

Parameters

participant
CommunicationIdentifier

<xref:%40azure%2Fcommunication-common%23CommunicationIdentifier> of the participant to be removed

Returns

Promise<void>

removeParticipant(string)

Remove a participant from the call.

function removeParticipant(userId: string): Promise<void>

Parameters

userId

string

Id of the participant to be removed

Returns

Promise<void>

resumeCall()

Resumes the call from a LocalHold state.

function resumeCall(): Promise<void>

Returns

Promise<void>

returnFromBreakoutRoom()

Return to origin call of breakout room

function returnFromBreakoutRoom(): Promise<void>

Returns

Promise<void>

sendDtmfTone(DtmfTone)

send dtmf tone to another participant in a 1:1 PSTN call

function sendDtmfTone(dtmfTone: DtmfTone): Promise<void>

Parameters

dtmfTone
DtmfTone

Returns

Promise<void>

setCaptionLanguage(string)

Function to set caption language

function setCaptionLanguage(language: string): Promise<void>

Parameters

language

string

language set for caption

Returns

Promise<void>

setSpokenLanguage(string)

Function to set spoken language

function setSpokenLanguage(language: string): Promise<void>

Parameters

language

string

spoken language

Returns

Promise<void>

setTogetherModeSceneSize(number, number)

Recalculate the seating positions for together mode.

function setTogetherModeSceneSize(width: number, height: number)

Parameters

width

number

Width of the container

height

number

Height of the container

Remarks

This method is implemented for composite

startCamera(VideoStreamOptions)

Start the camera This method will start rendering a local camera view when the call is not active

function startCamera(options?: VideoStreamOptions): Promise<void>

Parameters

options
VideoStreamOptions

Options to control how video streams are rendered <xref:%40azure%2Fcommunication-calling%23VideoStreamOptions>

Returns

Promise<void>

startCaptions(StartCaptionsAdapterOptions)

Function to Start captions

function startCaptions(options?: StartCaptionsAdapterOptions): Promise<void>

Parameters

options
StartCaptionsAdapterOptions

options for start captions

Returns

Promise<void>

startNoiseSuppressionEffect()

Start the noise suppression effect.

function startNoiseSuppressionEffect(): Promise<void>

Returns

Promise<void>

startScreenShare()

Start sharing the screen during a call.

function startScreenShare(): Promise<void>

Returns

Promise<void>

startSpotlight(string[])

Start spotlight for local and remote participants by their user ids. If no array of user ids is passed then action is performed on local participant.

function startSpotlight(userIds?: string[]): Promise<void>

Parameters

userIds

string[]

Returns

Promise<void>

startTogetherMode()

Start Together mode.

function startTogetherMode(): Promise<void>

Returns

Promise<void>

startVideoBackgroundEffect(VideoBackgroundEffect)

Start the video background effect.

function startVideoBackgroundEffect(videoBackgroundEffect: VideoBackgroundEffect): Promise<void>

Parameters

videoBackgroundEffect
VideoBackgroundEffect

Returns

Promise<void>

stopAllSpotlight()

Stop all spotlights

function stopAllSpotlight(): Promise<void>

Returns

Promise<void>

stopCamera()

Stop the camera This method will stop rendering a local camera view when the call is not active

function stopCamera(): Promise<void>

Returns

Promise<void>

stopCaptions(StopCaptionsAdapterOptions)

Funtion to stop captions

function stopCaptions(options?: StopCaptionsAdapterOptions): Promise<void>

Parameters

Returns

Promise<void>

stopNoiseSuppressionEffect()

Stop the noise suppression effect.

function stopNoiseSuppressionEffect(): Promise<void>

Returns

Promise<void>

stopScreenShare()

Stop sharing the screen

function stopScreenShare(): Promise<void>

Returns

Promise<void>

stopSpotlight(string[])

Stop spotlight for local and remote participants by their user ids. If no array of user ids is passed then action is performed on local participant.

function stopSpotlight(userIds?: string[]): Promise<void>

Parameters

userIds

string[]

Returns

Promise<void>

stopVideoBackgroundEffects()

Stop the video background effect.

function stopVideoBackgroundEffects(): Promise<void>

Returns

Promise<void>

submitSurvey(CallSurvey)

Send the end of call survey result

function submitSurvey(survey: CallSurvey): Promise<undefined | CallSurveyResponse>

Parameters

survey
CallSurvey

Returns

Promise<undefined | CallSurveyResponse>

unmute()

Unmute the current user during the call or enable microphone locally

function unmute(): Promise<void>

Returns

Promise<void>

updateBackgroundPickerImages(VideoBackgroundImage[])

Override the background picker images for background replacement effect.

function updateBackgroundPickerImages(backgroundImages: VideoBackgroundImage[])

Parameters

backgroundImages

VideoBackgroundImage[]

Array of custom background images.

updateSelectedVideoBackgroundEffect(VideoBackgroundEffect)

Update the selected video background effect.

function updateSelectedVideoBackgroundEffect(selectedVideoBackground: VideoBackgroundEffect)

Parameters

selectedVideoBackground
VideoBackgroundEffect