Call interface

Represents a Call.

Extends

Properties

info

Get information about this Call.

Inherited Properties

callEndReason

Containing code/subCode indicating how this call ended.

callerInfo

Caller Information if this call is incoming.

direction

Get the call direction, whether it is Incoming or Outgoing.

id

Get the unique Id for this Call.

isIncomingAudioMuted

Whether local user muted incoming audio.

isLocalVideoStarted

Whether local video is on.

isMuted

Whether local user is muted, locally or remotely.

isScreenSharingOn

Whether screen sharing is on.

kind

Get the kind of call object.

lobby

Get the Teams meeting lobby.

localAudioStreams

Collection of local audio streams being sent to other participants in a call.

localVideoStreams

Collection of local video streams being sent to other participants in a call.

remoteAudioStreams

Collection of remote audio streams being received from the call.

remoteParticipants

Collection of remote participants in this call. In case of calls with participants of hundred or more, only media active participants are present in this collection.

role

Get the role of the local user in the Call.

state

Get the state of this Call.

totalParticipantCount

Count of total number of participants in this call.

Methods

addParticipant(CommunicationUserIdentifier | MicrosoftTeamsUserIdentifier)

Add a participant to this Call.

addParticipant(CommunicationUserIdentifier, AddCommunicationUserOptions)

Add a participant to this Call.

addParticipant(MicrosoftTeamsAppIdentifier | UnknownIdentifier)

Add a Teams App to this Call.

addParticipant(MicrosoftTeamsUserIdentifier, AddMicrosoftTeamsUserOptions)

Add a participant to this Call.

addParticipant(PhoneNumberIdentifier, AddPhoneNumberOptions)

Add a participant to this Call.

removeParticipant(CommunicationIdentifier)

Remove a participant from this Call.

Inherited Methods

dispose()
feature<TFeature>(CallFeatureFactory<TFeature>)

Retrieves an initialized and memoized Feature object with extended API. Check the object Features.* for all available extended call features in this package, example:

const call: Call = ...;
call.feature(Features.Recording).isRecordingActive;
call.feature(Features.Captions).startCaptions('en-us')
hangUp(HangUpOptions)

Hang up the call.

hold()

Put this Call on hold.

mute()

Mute local microphone.

muteAllRemoteParticipants()

Mute all remote participants.

muteIncomingAudio()

Mute incoming audio.

off("idChanged", PropertyChangedEvent)

Unsubscribe function for idChanged event.

off("isIncomingAudioMutedChanged", PropertyChangedEvent)

Subscribe function for isIncomingAudioMutedChanged event.

off("isLocalVideoStartedChanged", PropertyChangedEvent)

Unsubscribe function for isLocalVideoStartedChanged event.

off("isMutedChanged", PropertyChangedEvent)

Subscribe function for isMutedChanged event.

off("isScreenSharingOnChanged", PropertyChangedEvent)

Unsubscribe function for isScreenSharingChanged event.

off("localAudioStreamsUpdated", CollectionUpdatedEvent<LocalAudioStream>)

Unsubscribe function for localAudioStreamsUpdated event.

off("localVideoStreamsUpdated", CollectionUpdatedEvent<LocalVideoStream>)

Unsubscribe function for localVideoStreamsUpdated event.

off("mutedByOthers", PropertyChangedEvent)

Unsubscribe function for mutedByOthers event.

off("remoteAudioStreamsUpdated", CollectionUpdatedEvent<RemoteAudioStream>)

Unsubscribe function for remoteAudioStreamsUpdated event.

off("remoteParticipantsUpdated", CollectionUpdatedEvent<RemoteParticipant>)

Unsubscribe function for remoteParticipantsUpdated event.

off("roleChanged", PropertyChangedEvent)

Unsubscribe function for roleChanged event.

off("stateChanged", PropertyChangedEvent)

Unsubscribe function for stateChanged event.

off("totalParticipantCountChanged", PropertyChangedEvent)

unsubscribe function for totalParticipantCountChanged event.

on("idChanged", PropertyChangedEvent)

Subscribe function for idChanged event.

on("isIncomingAudioMutedChanged", PropertyChangedEvent)

Subscribe function for isIncomingAudioMutedChanged event.

on("isLocalVideoStartedChanged", PropertyChangedEvent)

Subscribe function for isLocalVideoStartedChanged event.

on("isMutedChanged", PropertyChangedEvent)

Subscribe function for isMutedChanged event.

on("isScreenSharingOnChanged", PropertyChangedEvent)

Subscribe function for isScreenSharingChanged event.

on("localAudioStreamsUpdated", CollectionUpdatedEvent<LocalAudioStream>)

Subscribe function for localAudioStreamsUpdated event.

on("localVideoStreamsUpdated", CollectionUpdatedEvent<LocalVideoStream>)

Subscribe function for localVideoStreamsUpdated event.

on("mutedByOthers", PropertyChangedEvent)

Subscribe function for mutedByOthers event.

on("remoteAudioStreamsUpdated", CollectionUpdatedEvent<RemoteAudioStream>)

Subscribe function for remoteAudioStreamsUpdated event.

on("remoteParticipantsUpdated", CollectionUpdatedEvent<RemoteParticipant>)

Subscribe function for remoteParticipantsUpdated event.

on("roleChanged", PropertyChangedEvent)

Subscribe function for roleChanged event.

on("stateChanged", PropertyChangedEvent)

Subscribe function for stateChanged event.

on("totalParticipantCountChanged", PropertyChangedEvent)

Subscribe function for totalParticipantCountChanged event.

resume()

Resume this Call if it is on 'LocalHold' state.

sendDtmf(DtmfTone)

Send DTMF tone.

setConstraints(CallConstraints)

Set call constraints. This method sets the max constraints of based on the values provided. The final applied constraints will be less than or equal to the values provided here to this method. If 0 value is provided, then no constraint will be applied for that constraint. If undefined value is provided, then the previous value used will be used for that constraint.

startAudio(LocalAudioStream)

Start audio in the call with custom audio. LocalAudioStream source should be a MediaStream.

startScreenSharing()
  • Start sending screen sharing stream in a call. Browser will prompt to select the screen, app, or browser tab.
  • Sending screen sharing stream is not supported on iOS nor Android.
  • Incoming screen sharing stream is supported on iOS and Android.
startScreenSharing(LocalVideoStream)
  • Start sending raw screen sharing stream in a call.
  • Sending raw screen sharing is not supported on iOS nor Android.
  • Incoming raw screen sharing is supported on iOS and Android.
startVideo(LocalVideoStream)

Start sending video stream in the call. Remote participants in the call will receive your video stream so that they can render it in their UIs.

stopAudio()

Stop custom audio in the call and switch to Device manager default audio device.

stopScreenSharing()

Stop local screen sharing.

stopScreenSharing(LocalVideoStream)

Stop local screen sharing.

stopVideo(LocalVideoStream)

Stop sending video stream in the call. Must pass the same LocalVideoStream object that was used to start video in the CallAgent.startCall() API, CallAgent.join() API , IncomingCall.accept() API, or Call.startVideo() API.

unmute()

Unmute local microphone.

unmuteIncomingAudio()

Unmute incoming audio.

Property Details

info

Get information about this Call.

info: CallInfo

Property Value

Inherited Property Details

callEndReason

Containing code/subCode indicating how this call ended.

callEndReason?: CallEndReason

Property Value

Inherited From CallCommon.callEndReason

callerInfo

Caller Information if this call is incoming.

callerInfo: CallerInfo

Property Value

Inherited From CallCommon.callerInfo

direction

Get the call direction, whether it is Incoming or Outgoing.

direction: CallDirection

Property Value

Inherited From CallCommon.direction

id

Get the unique Id for this Call.

id: string

Property Value

string

Inherited From CallCommon.id

isIncomingAudioMuted

Whether local user muted incoming audio.

isIncomingAudioMuted: boolean

Property Value

boolean

Inherited From CallCommon.isIncomingAudioMuted

isLocalVideoStarted

Whether local video is on.

isLocalVideoStarted: boolean

Property Value

boolean

Inherited From CallCommon.isLocalVideoStarted

isMuted

Whether local user is muted, locally or remotely.

isMuted: boolean

Property Value

boolean

Inherited From CallCommon.isMuted

isScreenSharingOn

Whether screen sharing is on.

isScreenSharingOn: boolean

Property Value

boolean

Inherited From CallCommon.isScreenSharingOn

kind

Get the kind of call object.

kind: CallKind

Property Value

Inherited From CallCommon.kind

lobby

Get the Teams meeting lobby.

lobby: Lobby

Property Value

Inherited From CallCommon.lobby

localAudioStreams

Collection of local audio streams being sent to other participants in a call.

localAudioStreams: readonly LocalAudioStream[]

Property Value

readonly LocalAudioStream[]

Inherited From CallCommon.localAudioStreams

localVideoStreams

Collection of local video streams being sent to other participants in a call.

localVideoStreams: readonly LocalVideoStream[]

Property Value

readonly LocalVideoStream[]

Inherited From CallCommon.localVideoStreams

remoteAudioStreams

Collection of remote audio streams being received from the call.

remoteAudioStreams: readonly RemoteAudioStream[]

Property Value

readonly RemoteAudioStream[]

Inherited From CallCommon.remoteAudioStreams

remoteParticipants

Collection of remote participants in this call. In case of calls with participants of hundred or more, only media active participants are present in this collection.

remoteParticipants: readonly RemoteParticipant[]

Property Value

readonly RemoteParticipant[]

Inherited From CallCommon.remoteParticipants

role

Get the role of the local user in the Call.

role: ParticipantRole

Property Value

Inherited From CallCommon.role

state

Get the state of this Call.

state: CallState

Property Value

Inherited From CallCommon.state

totalParticipantCount

Note

This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Count of total number of participants in this call.

totalParticipantCount: number

Property Value

number

Inherited From CallCommon.totalParticipantCount

Method Details

addParticipant(CommunicationUserIdentifier | MicrosoftTeamsUserIdentifier)

Add a participant to this Call.

function addParticipant(identifier: CommunicationUserIdentifier | MicrosoftTeamsUserIdentifier): RemoteParticipant

Parameters

identifier

CommunicationUserIdentifier | MicrosoftTeamsUserIdentifier

The identifier of the participant to add.

Returns

The RemoteParticipant object associated with the successfully added participant.

addParticipant(CommunicationUserIdentifier, AddCommunicationUserOptions)

Note

This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Add a participant to this Call.

function addParticipant(identifier: CommunicationUserIdentifier, options?: AddCommunicationUserOptions): RemoteParticipant

Parameters

identifier
CommunicationUserIdentifier

The identifier of the participant to add.

options
AddCommunicationUserOptions

Additional options for managing the call.

Returns

The RemoteParticipant object associated with the successfully added participant.

addParticipant(MicrosoftTeamsAppIdentifier | UnknownIdentifier)

Note

This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Add a Teams App to this Call.

function addParticipant(identifier: MicrosoftTeamsAppIdentifier | UnknownIdentifier): RemoteParticipant

Parameters

identifier

MicrosoftTeamsAppIdentifier | UnknownIdentifier

The identifier of the Teams App to add.

Returns

The RemoteParticipant object associated with the successfully added Teams App.

addParticipant(MicrosoftTeamsUserIdentifier, AddMicrosoftTeamsUserOptions)

Note

This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Add a participant to this Call.

function addParticipant(identifier: MicrosoftTeamsUserIdentifier, options: AddMicrosoftTeamsUserOptions): RemoteParticipant

Parameters

identifier
MicrosoftTeamsUserIdentifier

The identifier of the participant to add.

options
AddMicrosoftTeamsUserOptions

Additional options for managing the call.

Returns

The RemoteParticipant object associated with the successfully added participant.

addParticipant(PhoneNumberIdentifier, AddPhoneNumberOptions)

Add a participant to this Call.

function addParticipant(identifier: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): RemoteParticipant

Parameters

identifier
PhoneNumberIdentifier

The identifier of the participant to add.

options
AddPhoneNumberOptions

Additional options for managing the PSTN call. For example, setting the Caller Id phone number in a PSTN call.

Returns

The RemoteParticipant object associated with the successfully added participant.

removeParticipant(CommunicationIdentifier)

Remove a participant from this Call.

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

Parameters

identifier
CommunicationIdentifier

The identifier of the participant to remove.

Returns

Promise<void>

Inherited Method Details

dispose()

function dispose()

Inherited From CallCommon.dispose

feature<TFeature>(CallFeatureFactory<TFeature>)

Retrieves an initialized and memoized Feature object with extended API. Check the object Features.* for all available extended call features in this package, example:

const call: Call = ...;
call.feature(Features.Recording).isRecordingActive;
call.feature(Features.Captions).startCaptions('en-us')
function feature<TFeature>(factory: CallFeatureFactory<TFeature>): TFeature

Parameters

factory

CallFeatureFactory<TFeature>

The factory for the call feature constructor that provides an extended API.

Returns

TFeature

Inherited From CallCommon.feature

hangUp(HangUpOptions)

Hang up the call.

function hangUp(options?: HangUpOptions): Promise<void>

Parameters

options
HangUpOptions

HangUp options.

Returns

Promise<void>

Inherited From CallCommon.hangUp

hold()

Put this Call on hold.

function hold(): Promise<void>

Returns

Promise<void>

Inherited From CallCommon.hold

mute()

Mute local microphone.

function mute(): Promise<void>

Returns

Promise<void>

Inherited From CallCommon.mute

muteAllRemoteParticipants()

Mute all remote participants.

function muteAllRemoteParticipants(): Promise<void>

Returns

Promise<void>

Inherited From CallCommon.muteAllRemoteParticipants

muteIncomingAudio()

Mute incoming audio.

function muteIncomingAudio(): Promise<void>

Returns

Promise<void>

Inherited From CallCommon.muteIncomingAudio

off("idChanged", PropertyChangedEvent)

Unsubscribe function for idChanged event.

function off(event: "idChanged", listener: PropertyChangedEvent)

Parameters

event

"idChanged"

event name.

listener
PropertyChangedEvent

callback fn that was used to subscribe to this event.

Inherited From CallCommon.off

off("isIncomingAudioMutedChanged", PropertyChangedEvent)

Subscribe function for isIncomingAudioMutedChanged event.

function off(event: "isIncomingAudioMutedChanged", listener: PropertyChangedEvent)

Parameters

event

"isIncomingAudioMutedChanged"

event name.

listener
PropertyChangedEvent

callback fn that will be called when value of this property will change.

Inherited From CallCommon.off

off("isLocalVideoStartedChanged", PropertyChangedEvent)

Unsubscribe function for isLocalVideoStartedChanged event.

function off(event: "isLocalVideoStartedChanged", listener: PropertyChangedEvent)

Parameters

event

"isLocalVideoStartedChanged"

event name.

listener
PropertyChangedEvent

callback fn that will be called when value of this property will change.

Inherited From CallCommon.off

off("isMutedChanged", PropertyChangedEvent)

Subscribe function for isMutedChanged event.

function off(event: "isMutedChanged", listener: PropertyChangedEvent)

Parameters

event

"isMutedChanged"

event name.

listener
PropertyChangedEvent

callback fn that will be called when value of this property will change.

Inherited From CallCommon.off

off("isScreenSharingOnChanged", PropertyChangedEvent)

Unsubscribe function for isScreenSharingChanged event.

function off(event: "isScreenSharingOnChanged", listener: PropertyChangedEvent)

Parameters

event

"isScreenSharingOnChanged"

event name.

listener
PropertyChangedEvent

callback fn that was used to subscribe to this event.

Inherited From CallCommon.off

off("localAudioStreamsUpdated", CollectionUpdatedEvent<LocalAudioStream>)

Unsubscribe function for localAudioStreamsUpdated event.

function off(event: "localAudioStreamsUpdated", listener: CollectionUpdatedEvent<LocalAudioStream>)

Parameters

event

"localAudioStreamsUpdated"

event name.

listener

CollectionUpdatedEvent<LocalAudioStream>

callback fn that was used to subscribe to this event.

Inherited From CallCommon.off

off("localVideoStreamsUpdated", CollectionUpdatedEvent<LocalVideoStream>)

Unsubscribe function for localVideoStreamsUpdated event.

function off(event: "localVideoStreamsUpdated", listener: CollectionUpdatedEvent<LocalVideoStream>)

Parameters

event

"localVideoStreamsUpdated"

event name.

listener

CollectionUpdatedEvent<LocalVideoStream>

callback fn that was used to subscribe to this event.

Inherited From CallCommon.off

off("mutedByOthers", PropertyChangedEvent)

Unsubscribe function for mutedByOthers event.

function off(event: "mutedByOthers", listener: PropertyChangedEvent)

Parameters

event

"mutedByOthers"

event name.

listener
PropertyChangedEvent

callback fn that was used to unsubscribe to this event.

Inherited From CallCommon.off

off("remoteAudioStreamsUpdated", CollectionUpdatedEvent<RemoteAudioStream>)

Unsubscribe function for remoteAudioStreamsUpdated event.

function off(event: "remoteAudioStreamsUpdated", listener: CollectionUpdatedEvent<RemoteAudioStream>)

Parameters

event

"remoteAudioStreamsUpdated"

event name.

listener

CollectionUpdatedEvent<RemoteAudioStream>

callback fn that was used to subscribe to this event.

Inherited From CallCommon.off

off("remoteParticipantsUpdated", CollectionUpdatedEvent<RemoteParticipant>)

Unsubscribe function for remoteParticipantsUpdated event.

function off(event: "remoteParticipantsUpdated", listener: CollectionUpdatedEvent<RemoteParticipant>)

Parameters

event

"remoteParticipantsUpdated"

event name.

listener

CollectionUpdatedEvent<RemoteParticipant>

callback fn that was used to subscribe to this event.

Inherited From CallCommon.off

off("roleChanged", PropertyChangedEvent)

Unsubscribe function for roleChanged event.

function off(event: "roleChanged", listener: PropertyChangedEvent)

Parameters

event

"roleChanged"

event name.

listener
PropertyChangedEvent

callback fn that was used to subscribe to this event.

Inherited From CallCommon.off

off("stateChanged", PropertyChangedEvent)

Unsubscribe function for stateChanged event.

function off(event: "stateChanged", listener: PropertyChangedEvent)

Parameters

event

"stateChanged"

event name.

listener
PropertyChangedEvent

callback fn that was used to subscribe to this event.

Inherited From CallCommon.off

off("totalParticipantCountChanged", PropertyChangedEvent)

Note

This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

unsubscribe function for totalParticipantCountChanged event.

function off(event: "totalParticipantCountChanged", listener: PropertyChangedEvent)

Parameters

event

"totalParticipantCountChanged"

event name.

listener
PropertyChangedEvent

callback fn that will be called when the participant count changes.

Inherited From CallCommon.off

on("idChanged", PropertyChangedEvent)

Subscribe function for idChanged event.

function on(event: "idChanged", listener: PropertyChangedEvent)

Parameters

event

"idChanged"

event name.

listener
PropertyChangedEvent

callback fn that will be called when value of this property will change.

Inherited From CallCommon.on

on("isIncomingAudioMutedChanged", PropertyChangedEvent)

Subscribe function for isIncomingAudioMutedChanged event.

function on(event: "isIncomingAudioMutedChanged", listener: PropertyChangedEvent)

Parameters

event

"isIncomingAudioMutedChanged"

event name.

listener
PropertyChangedEvent

callback fn that will be called when value of this property will change.

Inherited From CallCommon.on

on("isLocalVideoStartedChanged", PropertyChangedEvent)

Subscribe function for isLocalVideoStartedChanged event.

function on(event: "isLocalVideoStartedChanged", listener: PropertyChangedEvent)

Parameters

event

"isLocalVideoStartedChanged"

event name.

listener
PropertyChangedEvent

callback fn that will be called when value of this property will change.

Inherited From CallCommon.on

on("isMutedChanged", PropertyChangedEvent)

Subscribe function for isMutedChanged event.

function on(event: "isMutedChanged", listener: PropertyChangedEvent)

Parameters

event

"isMutedChanged"

event name.

listener
PropertyChangedEvent

callback fn that will be called when value of this property will change.

Inherited From CallCommon.on

on("isScreenSharingOnChanged", PropertyChangedEvent)

Subscribe function for isScreenSharingChanged event.

function on(event: "isScreenSharingOnChanged", listener: PropertyChangedEvent)

Parameters

event

"isScreenSharingOnChanged"

event name.

listener
PropertyChangedEvent

callback fn that will be called when value of this property will change.

Inherited From CallCommon.on

on("localAudioStreamsUpdated", CollectionUpdatedEvent<LocalAudioStream>)

Subscribe function for localAudioStreamsUpdated event.

function on(event: "localAudioStreamsUpdated", listener: CollectionUpdatedEvent<LocalAudioStream>)

Parameters

event

"localAudioStreamsUpdated"

event name.

listener

CollectionUpdatedEvent<LocalAudioStream>

callback fn that will be called when this collection will change, it will pass arrays of added and removed elements.

Inherited From CallCommon.on

on("localVideoStreamsUpdated", CollectionUpdatedEvent<LocalVideoStream>)

Subscribe function for localVideoStreamsUpdated event.

function on(event: "localVideoStreamsUpdated", listener: CollectionUpdatedEvent<LocalVideoStream>)

Parameters

event

"localVideoStreamsUpdated"

event name.

listener

CollectionUpdatedEvent<LocalVideoStream>

callback fn that will be called when this collection will change, it will pass arrays of added and removed elements.

Inherited From CallCommon.on

on("mutedByOthers", PropertyChangedEvent)

Subscribe function for mutedByOthers event.

function on(event: "mutedByOthers", listener: PropertyChangedEvent)

Parameters

event

"mutedByOthers"

event name.

listener
PropertyChangedEvent

callback fn that was used to subscribe to this event.

Inherited From CallCommon.on

on("remoteAudioStreamsUpdated", CollectionUpdatedEvent<RemoteAudioStream>)

Subscribe function for remoteAudioStreamsUpdated event.

function on(event: "remoteAudioStreamsUpdated", listener: CollectionUpdatedEvent<RemoteAudioStream>)

Parameters

event

"remoteAudioStreamsUpdated"

event name.

listener

CollectionUpdatedEvent<RemoteAudioStream>

callback fn that will be called when this collection will change, it will pass arrays of added and removed elements.

Inherited From CallCommon.on

on("remoteParticipantsUpdated", CollectionUpdatedEvent<RemoteParticipant>)

Subscribe function for remoteParticipantsUpdated event.

function on(event: "remoteParticipantsUpdated", listener: CollectionUpdatedEvent<RemoteParticipant>)

Parameters

event

"remoteParticipantsUpdated"

event name.

listener

CollectionUpdatedEvent<RemoteParticipant>

callback fn that will be called when this collection will change, it will pass arrays of added and removed elements.

Inherited From CallCommon.on

on("roleChanged", PropertyChangedEvent)

Subscribe function for roleChanged event.

function on(event: "roleChanged", listener: PropertyChangedEvent)

Parameters

event

"roleChanged"

event name.

listener
PropertyChangedEvent

callback fn that will be called when value of this property will change.

Inherited From CallCommon.on

on("stateChanged", PropertyChangedEvent)

Subscribe function for stateChanged event.

function on(event: "stateChanged", listener: PropertyChangedEvent)

Parameters

event

"stateChanged"

event name.

listener
PropertyChangedEvent

callback fn that will be called when value of this property will change.

Inherited From CallCommon.on

on("totalParticipantCountChanged", PropertyChangedEvent)

Note

This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Subscribe function for totalParticipantCountChanged event.

function on(event: "totalParticipantCountChanged", listener: PropertyChangedEvent)

Parameters

event

"totalParticipantCountChanged"

event name.

listener
PropertyChangedEvent

callback fn that will be called when the participant count changes.

Inherited From CallCommon.on

resume()

Resume this Call if it is on 'LocalHold' state.

function resume(): Promise<void>

Returns

Promise<void>

Inherited From CallCommon.resume

sendDtmf(DtmfTone)

Send DTMF tone.

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

Parameters

dtmfTone
DtmfTone

Returns

Promise<void>

Inherited From CallCommon.sendDtmf

setConstraints(CallConstraints)

Set call constraints. This method sets the max constraints of based on the values provided. The final applied constraints will be less than or equal to the values provided here to this method. If 0 value is provided, then no constraint will be applied for that constraint. If undefined value is provided, then the previous value used will be used for that constraint.

function setConstraints(constraints: CallConstraints): Promise<void>

Parameters

constraints
CallConstraints

Object representing the call constraints to set

Returns

Promise<void>

Inherited From CallCommon.setConstraints

startAudio(LocalAudioStream)

Start audio in the call with custom audio. LocalAudioStream source should be a MediaStream.

function startAudio(localAudioStream: LocalAudioStream): Promise<void>

Parameters

localAudioStream
LocalAudioStream

Returns

Promise<void>

Inherited From CallCommon.startAudio

startScreenSharing()

  • Start sending screen sharing stream in a call. Browser will prompt to select the screen, app, or browser tab.
  • Sending screen sharing stream is not supported on iOS nor Android.
  • Incoming screen sharing stream is supported on iOS and Android.
function startScreenSharing(): Promise<void>

Returns

Promise<void>

Inherited From CallCommon.startScreenSharing

startScreenSharing(LocalVideoStream)

Note

This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

  • Start sending raw screen sharing stream in a call.
  • Sending raw screen sharing is not supported on iOS nor Android.
  • Incoming raw screen sharing is supported on iOS and Android.
function startScreenSharing(localVideoStream: LocalVideoStream): Promise<void>

Parameters

localVideoStream
LocalVideoStream

Represents a local raw screen sharing stream that takes a MediaStream in constructor.

Returns

Promise<void>

Inherited From CallCommon.startScreenSharing

startVideo(LocalVideoStream)

Start sending video stream in the call. Remote participants in the call will receive your video stream so that they can render it in their UIs.

function startVideo(localVideoStream: LocalVideoStream): Promise<void>

Parameters

localVideoStream
LocalVideoStream

Represents a local video stream that takes a camera source in constructor.

Returns

Promise<void>

Inherited From CallCommon.startVideo

stopAudio()

Stop custom audio in the call and switch to Device manager default audio device.

function stopAudio()

Inherited From CallCommon.stopAudio

stopScreenSharing()

Stop local screen sharing.

function stopScreenSharing(): Promise<void>

Returns

Promise<void>

Inherited From CallCommon.stopScreenSharing

stopScreenSharing(LocalVideoStream)

Note

This API is in Beta and provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Stop local screen sharing.

function stopScreenSharing(localVideoStream: LocalVideoStream): Promise<void>

Parameters

localVideoStream
LocalVideoStream

The local screen sharing stream to stop streaming.

Returns

Promise<void>

Inherited From CallCommon.stopScreenSharing

stopVideo(LocalVideoStream)

Stop sending video stream in the call. Must pass the same LocalVideoStream object that was used to start video in the CallAgent.startCall() API, CallAgent.join() API , IncomingCall.accept() API, or Call.startVideo() API.

function stopVideo(localVideoStream: LocalVideoStream): Promise<void>

Parameters

localVideoStream
LocalVideoStream

The local video stream to stop streaming.

Returns

Promise<void>

Inherited From CallCommon.stopVideo

unmute()

Unmute local microphone.

function unmute(): Promise<void>

Returns

Promise<void>

Inherited From CallCommon.unmute

unmuteIncomingAudio()

Unmute incoming audio.

function unmuteIncomingAudio(): Promise<void>

Returns

Promise<void>

Inherited From CallCommon.unmuteIncomingAudio