CallWithChatAdapterManagement interface
Functionality for managing the current call with chat.
Properties
forbid |
forbids audio for the specified user ids. |
forbid |
forbids audio for Teams meeting attendees except the local user. |
forbid |
forbids video for Teams meeting attendees except the local user. |
forbid |
forbids video for the specified user ids. |
permit |
permits audio for the specified user ids. |
permit |
permits audio for Teams meeting attendees except the local user. |
permit |
permits video for Teams meeting attendees except the local user. |
permit |
permits video for the specified user ids. |
send |
send dtmf tone to another participant in the call in 1:1 calls |
send |
Send real time text |
Methods
add |
|
add |
Adds a new Participant to the call. |
ask |
Ask for permissions of devices. |
create |
Create the html view for a stream. |
create |
Create the html view for a togethermode stream. |
delete |
Delete a message in the thread. |
dispose |
Dispose the html view for a local video stream |
dispose |
Dispose the html view for a remote video stream |
dispose |
Dispose the html view for a screen share stream |
dispose |
Dispose the html view for a stream. |
dispose |
Dispose the html view for a togethermode stream. |
download |
|
fetch |
Fetch initial state for the Chat adapter. Performs the minimal fetch necessary for ChatComposite and API methods. |
hold |
Puts the Call in a Localhold. |
join |
Join the call with microphone initially on/off. |
join |
Join the call with options bag to set microphone/camera initial state when joining call true = turn on the device when joining call false = turn off the device when joining call 'keep'/undefined = retain devices' precall state |
leave |
Leave the call. |
load |
Load more previous messages in the chat thread history. |
lower |
Lower hand for local user. |
mute() | Mute the current user during the call or disable microphone locally. |
mute |
Mute a participant |
mute |
Mute a participant |
on |
Send Reaction to ongoing meeting. |
query |
Query for available camera devices. |
query |
Query for available microphone devices. |
query |
Query for available microphone devices. |
raise |
Raise hand for local user. |
remove |
Remove a participant from the call. |
remove |
Remove a participant from a Call. |
remove |
|
resume |
Resumes the call from a LocalHold state. |
return |
Return to origin call of breakout room |
send |
Send a message in the thread. |
send |
Send a read receipt for a message. |
send |
Send typing indicator in the thread. |
set |
Set the camera to use in the call. |
set |
Function to set caption language |
set |
Set the microphone to use in the call. |
set |
Set the speaker to use in the call. |
set |
Function to set spoken language |
set |
Recalculate the seating positions for together mode. |
start |
Start the call. |
start |
Start the call. |
start |
Start the camera. This method will start rendering a local camera view when the call is not active. |
start |
Function to Start captions |
start |
Start the noise suppression effect. |
start |
Start sharing the screen during a call. |
start |
Start spotlight |
start |
Start together mode. |
start |
Start the video background effect. |
stop |
Stop all spotlights |
stop |
Stop the camera. This method will stop rendering a local camera view when the call is not active. |
stop |
Funtion to stop captions |
stop |
Start the noise suppression effect. |
stop |
Stop sharing the screen. |
stop |
Stop spotlight |
stop |
Stop the video background effect. |
submit |
Send the end of call survey result |
unmute() | Unmute the current user during the call or enable microphone locally. |
update |
Override the background picker images for background replacement effect. |
update |
Update a message content. |
update |
Update the selected video background effect |
Property Details
forbidAudio
forbids audio for the specified user ids.
forbidAudio: (userIds: string[]) => Promise<void>
Property Value
(userIds: string[]) => Promise<void>
forbidOthersAudio
forbids audio for Teams meeting attendees except the local user.
forbidOthersAudio: () => Promise<void>
Property Value
() => Promise<void>
forbidOthersVideo
forbids video for Teams meeting attendees except the local user.
forbidOthersVideo: () => Promise<void>
Property Value
() => Promise<void>
forbidVideo
forbids video for the specified user ids.
forbidVideo: (userIds: string[]) => Promise<void>
Property Value
(userIds: string[]) => Promise<void>
permitAudio
permits audio for the specified user ids.
permitAudio: (userIds: string[]) => Promise<void>
Property Value
(userIds: string[]) => Promise<void>
permitOthersAudio
permits audio for Teams meeting attendees except the local user.
permitOthersAudio: () => Promise<void>
Property Value
() => Promise<void>
permitOthersVideo
permits video for Teams meeting attendees except the local user.
permitOthersVideo: () => Promise<void>
Property Value
() => Promise<void>
permitVideo
permits video for the specified user ids.
permitVideo: (userIds: string[]) => Promise<void>
Property Value
(userIds: string[]) => Promise<void>
sendDtmfTone
send dtmf tone to another participant in the call in 1:1 calls
public sendDtmfTone: (dtmfTone: DtmfTone) => Promise<void>
Property Value
(dtmfTone: DtmfTone) => Promise<void>
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
- participant
- CommunicationUserIdentifier
Returns
Promise<void>
addParticipant(PhoneNumberIdentifier, AddPhoneNumberOptions)
Adds a new Participant to the call.
function addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void>
Parameters
- participant
- PhoneNumberIdentifier
- options
- AddPhoneNumberOptions
Returns
Promise<void>
askDevicePermission(PermissionConstraints)
Ask for permissions of devices.
function askDevicePermission(constrain: PermissionConstraints): Promise<DeviceAccess>
Parameters
- constrain
- PermissionConstraints
Define constraints for accessing local devices <xref:%40azure%2Fcommunication-calling%23PermissionConstraints>
Returns
Promise<DeviceAccess>
Remarks
Browser permission window will pop up if permissions are not granted yet.
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 togethermode 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
Promise<void | TogetherModeStreamViewResult>
Remarks
This method is implemented for composite
deleteMessage(string)
Delete a message in the thread.
function deleteMessage(messageId: string): Promise<void>
Parameters
- messageId
-
string
Returns
Promise<void>
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)
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 togethermode stream.
function disposeTogetherModeStreamView(): Promise<void>
Returns
Promise<void>
Remarks
This method is implemented for composite
downloadResourceToCache(ResourceDetails)
function downloadResourceToCache(resourceDetails: ResourceDetails): Promise<void>
Parameters
- resourceDetails
- ResourceDetails
Returns
Promise<void>
fetchInitialData()
Fetch initial state for the Chat adapter.
Performs the minimal fetch necessary for ChatComposite and API methods.
function fetchInitialData(): Promise<void>
Returns
Promise<void>
holdCall()
Puts the Call in a Localhold.
function holdCall(): Promise<void>
Returns
Promise<void>
joinCall(boolean)
Warning
This API is now deprecated.
Use joinCall(options?:JoinCallOptions) instead.
Join the call with microphone initially on/off.
function joinCall(microphoneOn?: boolean): undefined | Call
Parameters
- microphoneOn
-
boolean
Whether microphone is initially enabled
Returns
undefined | Call
joinCall(JoinCallOptions)
Join the call with options bag to set microphone/camera initial state when joining call true = turn on the device when joining call false = turn off the device when joining call 'keep'/undefined = retain devices' precall state
function joinCall(options?: JoinCallOptions): undefined | Call
Parameters
- options
- JoinCallOptions
param to set microphone/camera initially on/off/use precall state.
Returns
undefined | Call
leaveCall(boolean)
Leave the call.
function leaveCall(forEveryone?: boolean): Promise<void>
Parameters
- forEveryone
-
boolean
Whether to remove all participants when leaving
Returns
Promise<void>
loadPreviousChatMessages(number)
Load more previous messages in the chat thread history.
function loadPreviousChatMessages(messagesToLoad: number): Promise<boolean>
Parameters
- messagesToLoad
-
number
Returns
Promise<boolean>
Remarks
This method is usually used to control incremental fetch/infinite scroll.
lowerHand()
Lower hand for local 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 a participant
function muteAllRemoteParticipants(): Promise<void>
Returns
Promise<void>
muteParticipant(string)
Mute a participant
function muteParticipant(userId: string): Promise<void>
Parameters
- userId
-
string
Returns
Promise<void>
onReactionClick(Reaction)
Send Reaction to ongoing meeting.
function onReactionClick(reaction: Reaction): Promise<void>
Parameters
- reaction
- Reaction
A value of type <xref:%40azure%2Fcommunication-calling%23Reaction>
Returns
Promise<void>
queryCameras()
Query for available camera devices.
function queryCameras(): Promise<VideoDeviceInfo[]>
Returns
Promise<VideoDeviceInfo[]>
An array of video device information entities <xref:%40azure%2Fcommunication-calling%23VideoDeviceInfo>
Remarks
This method should be called after askDevicePermission()
queryMicrophones()
Query for available microphone devices.
function queryMicrophones(): Promise<AudioDeviceInfo[]>
Returns
Promise<AudioDeviceInfo[]>
An array of audio device information entities <xref:%40azure%2Fcommunication-calling%23AudioDeviceInfo>
Remarks
This method should be called after askDevicePermission()
querySpeakers()
Query for available microphone devices.
function querySpeakers(): Promise<AudioDeviceInfo[]>
Returns
Promise<AudioDeviceInfo[]>
An array of audio device information entities <xref:%40azure%2Fcommunication-calling%23AudioDeviceInfo>
Remarks
This method should be called after askDevicePermission()
raiseHand()
Raise hand for local 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 a Call.
function removeParticipant(userId: string): Promise<void>
Parameters
- userId
-
string
UserId of the participant to remove.
Returns
Promise<void>
removeResourceFromCache(ResourceDetails)
function removeResourceFromCache(resourceDetails: ResourceDetails)
Parameters
- resourceDetails
- ResourceDetails
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>
sendMessage(string, SendMessageOptions)
Send a message in the thread.
function sendMessage(content: string, options?: SendMessageOptions): Promise<void>
Parameters
- content
-
string
- options
- SendMessageOptions
Returns
Promise<void>
sendReadReceipt(string)
Send a read receipt for a message.
function sendReadReceipt(chatMessageId: string): Promise<void>
Parameters
- chatMessageId
-
string
Returns
Promise<void>
sendTypingIndicator()
Send typing indicator in the thread.
function sendTypingIndicator(): Promise<void>
Returns
Promise<void>
setCamera(VideoDeviceInfo, VideoStreamOptions)
Set the camera to use in the call.
function setCamera(sourceInfo: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void>
Parameters
- sourceInfo
- VideoDeviceInfo
Camera device to choose, pick one returned by queryCameras
- options
- VideoStreamOptions
Options to control how the camera stream is rendered <xref:%40azure%2Fcommunication-calling%23VideoStreamOptions>
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>
setMicrophone(AudioDeviceInfo)
Set the microphone to use in the call.
function setMicrophone(sourceInfo: AudioDeviceInfo): Promise<void>
Parameters
- sourceInfo
- AudioDeviceInfo
Microphone device to choose, pick one returned by queryMicrophones
Returns
Promise<void>
setSpeaker(AudioDeviceInfo)
Set the speaker to use in the call.
function setSpeaker(sourceInfo: AudioDeviceInfo): Promise<void>
Parameters
- sourceInfo
- AudioDeviceInfo
Speaker device to choose, pick one returned by querySpeakers
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
startCall((CommunicationUserIdentifier | PhoneNumberIdentifier | MicrosoftTeamsUserIdentifier | MicrosoftTeamsAppIdentifier | UnknownIdentifier)[], StartCallOptions)
Start the call.
function startCall(participants: (CommunicationUserIdentifier | PhoneNumberIdentifier | MicrosoftTeamsUserIdentifier | MicrosoftTeamsAppIdentifier | UnknownIdentifier)[], options?: StartCallOptions): undefined | Call
Parameters
- participants
-
(CommunicationUserIdentifier | PhoneNumberIdentifier | MicrosoftTeamsUserIdentifier | MicrosoftTeamsAppIdentifier | UnknownIdentifier)[]
An array of <xref:%40azure%2Fcommunication-common%23CommunicationIdentifier> to be called
- options
- StartCallOptions
Returns
undefined | Call
startCall(string[], StartCallOptions)
Start the call.
function startCall(participants: string[], options?: StartCallOptions): undefined | Call
Parameters
- participants
-
string[]
An array of participant ids to join
- options
- StartCallOptions
Returns
undefined | Call
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
function startSpotlight(userIds?: string[]): Promise<void>
Parameters
- userIds
-
string[]
Returns
Promise<void>
startTogetherMode()
Start together mode.
function startTogetherMode(): Promise<void>
Returns
Promise<void>
Remarks
This method is implemented for composite
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
- options
- StopCaptionsAdapterOptions
Returns
Promise<void>
stopNoiseSuppressionEffect()
Start 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
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
Array of custom background images.
updateMessage(string, string, Record<string, string>)
Update a message content.
function updateMessage(messageId: string, content: string, options?: Record<string, string>): Promise<void>
Parameters
- messageId
-
string
- content
-
string
- options
-
Record<string, string>
Returns
Promise<void>
updateSelectedVideoBackgroundEffect(VideoBackgroundEffect)
Update the selected video background effect
function updateSelectedVideoBackgroundEffect(selectedVideoBackground: VideoBackgroundEffect)
Parameters
- selectedVideoBackground
- VideoBackgroundEffect