CallAdapterCallOperations interface

Functionality for managing the current call.

Methods

createStreamView(string, VideoStreamOptions)

Create the html view for a stream.

disposeStreamView(string, VideoStreamOptions)

Dispose the html view for a stream.

leaveCall(boolean)

Leave the call

mute()

Mute the current user during the call or disable microphone locally

removeParticipant(string)

Remove a participant from the call.

startCamera(VideoStreamOptions)

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

startScreenShare()

Start sharing the screen during a call.

stopCamera()

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

stopScreenShare()

Stop sharing the screen

unmute()

Unmute the current user during the call or enable microphone locally

Method Details

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

disposeStreamView(string, VideoStreamOptions)

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

leaveCall(boolean)

Leave the call

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

Parameters

forEveryone

boolean

Whether to remove all participants when leaving

Returns

Promise<void>

mute()

Mute the current user during the call or disable microphone locally

function mute(): Promise<void>

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>

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>

startScreenShare()

Start sharing the screen during a call.

function startScreenShare(): 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>

stopScreenShare()

Stop sharing the screen

function stopScreenShare(): Promise<void>

Returns

Promise<void>

unmute()

Unmute the current user during the call or enable microphone locally

function unmute(): Promise<void>

Returns

Promise<void>