TeamsCall interface
Represents a Teams Call.
- Extends
Properties
info | Get information about this Teams Call. |
Inherited Properties
call |
Containing code/subCode indicating how this call ended. |
caller |
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. |
is |
Whether local user muted incoming audio. |
is |
Whether local video is on. |
is |
Whether local user is muted, locally or remotely. |
is |
Whether screen sharing is on. |
kind | Get the kind of call object. |
lobby | Get the Teams meeting lobby. |
local |
Collection of local audio streams being sent to other participants in a call. |
local |
Collection of local video streams being sent to other participants in a call. |
remote |
Collection of remote audio streams being received from the call. |
remote |
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. |
total |
Count of total number of participants in this call. |
Methods
Inherited Methods
dispose() | |
feature<TFeature>(Call |
Retrieves an initialized and memoized Feature object with extended API. Check the object Features.* for all available extended call features in this package, example:
|
hang |
Hang up the call. |
hold() | Put this Call on hold. |
mute() | Mute local microphone. |
mute |
Mute all remote participants. |
mute |
Mute incoming audio. |
off("id |
Unsubscribe function for idChanged event. |
off("is |
Subscribe function for isIncomingAudioMutedChanged event. |
off("is |
Unsubscribe function for isLocalVideoStartedChanged event. |
off("is |
Subscribe function for isMutedChanged event. |
off("is |
Unsubscribe function for isScreenSharingChanged event. |
off("local |
Unsubscribe function for localAudioStreamsUpdated event. |
off("local |
Unsubscribe function for localVideoStreamsUpdated event. |
off("muted |
Unsubscribe function for mutedByOthers event. |
off("remote |
Unsubscribe function for remoteAudioStreamsUpdated event. |
off("remote |
Unsubscribe function for remoteParticipantsUpdated event. |
off("role |
Unsubscribe function for roleChanged event. |
off("state |
Unsubscribe function for stateChanged event. |
off("total |
unsubscribe function for totalParticipantCountChanged event. |
on("id |
Subscribe function for idChanged event. |
on("is |
Subscribe function for isIncomingAudioMutedChanged event. |
on("is |
Subscribe function for isLocalVideoStartedChanged event. |
on("is |
Subscribe function for isMutedChanged event. |
on("is |
Subscribe function for isScreenSharingChanged event. |
on("local |
Subscribe function for localAudioStreamsUpdated event. |
on("local |
Subscribe function for localVideoStreamsUpdated event. |
on("muted |
Subscribe function for mutedByOthers event. |
on("remote |
Subscribe function for remoteAudioStreamsUpdated event. |
on("remote |
Subscribe function for remoteParticipantsUpdated event. |
on("role |
Subscribe function for roleChanged event. |
on("state |
Subscribe function for stateChanged event. |
on("total |
Subscribe function for totalParticipantCountChanged event. |
resume() | Resume this Call if it is on 'LocalHold' state. |
send |
Send DTMF tone. |
set |
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. |
start |
Start audio in the call with custom audio. LocalAudioStream source should be a MediaStream. |
start |
|
start |
|
start |
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. |
stop |
Stop custom audio in the call and switch to Device manager default audio device. |
stop |
Stop local screen sharing. |
stop |
Stop local screen sharing. |
stop |
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. |
unmute |
Unmute incoming audio. |
Property Details
info
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
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
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
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(PhoneNumberIdentifier | MicrosoftTeamsUserIdentifier | MicrosoftTeamsAppIdentifier | UnknownIdentifier, AddTeamsParticipantOptions)
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.
function addParticipant(participant: PhoneNumberIdentifier | MicrosoftTeamsUserIdentifier | MicrosoftTeamsAppIdentifier | UnknownIdentifier, options?: AddTeamsParticipantOptions): RemoteParticipant
Parameters
- participant
-
PhoneNumberIdentifier | MicrosoftTeamsUserIdentifier | MicrosoftTeamsAppIdentifier | UnknownIdentifier
Participant to be added
- options
- AddTeamsParticipantOptions
AddTeamsParticipantOptions
Returns
removeParticipant(PhoneNumberIdentifier | MicrosoftTeamsUserIdentifier | UnknownIdentifier)
Remove a participant from this call.
function removeParticipant(participant: PhoneNumberIdentifier | MicrosoftTeamsUserIdentifier | UnknownIdentifier): Promise<void>
Parameters
- participant
-
PhoneNumberIdentifier | MicrosoftTeamsUserIdentifier | UnknownIdentifier
the participant to be removed.
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
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
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
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
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
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
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
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
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