CallWithChatAdapter interface
CallWithChatComposite Adapter interface.
- Extends
Inherited Methods
Inherited Method Details
askDevicePermission(PermissionConstraints)
Ask for permissions of devices.
function askDevicePermission(constrain: PermissionConstraints): Promise<void>
Parameters
- constrain
- PermissionConstraints
Define constraints for accessing local devices <xref:%40azure%2Fcommunication-calling%23PermissionConstraints>
Returns
Promise<void>
Remarks
Browser permission window will pop up if permissions are not granted yet.
Inherited From CallWithChatAdapterManagement.askDevicePermission
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.
Inherited From CallWithChatAdapterManagement.createStreamView
deleteMessage(string)
Delete a message in the thread.
function deleteMessage(messageId: string): Promise<void>
Parameters
- messageId
-
string
Returns
Promise<void>
Inherited From CallWithChatAdapterManagement.deleteMessage
dispose()
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.
Inherited From CallWithChatAdapterManagement.disposeStreamView
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>
Inherited From CallWithChatAdapterManagement.fetchInitialData
getState()
Get the current State
function getState(): CallWithChatAdapterState
Returns
Inherited From AdapterState.getState
joinCall(boolean)
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
Inherited From CallWithChatAdapterManagement.joinCall
leaveCall(boolean)
Leave the call.
function leaveCall(forEveryone?: boolean): Promise<void>
Parameters
- forEveryone
-
boolean
Whether to remove all participants when leaving
Returns
Promise<void>
Inherited From CallWithChatAdapterManagement.leaveCall
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.
Inherited From CallWithChatAdapterManagement.loadPreviousChatMessages
mute()
Mute the current user during the call or disable microphone locally.
function mute(): Promise<void>
Returns
Promise<void>
Inherited From CallWithChatAdapterManagement.mute
off("callEnded", CallEndedListener)
function off(event: "callEnded", listener: CallEndedListener)
Parameters
- event
-
"callEnded"
- listener
- CallEndedListener
Inherited From CallWithChatAdapterSubscriptions.off
off("callError", (e: AdapterError) => void)
function off(event: "callError", listener: (e: AdapterError) => void)
Parameters
- event
-
"callError"
- listener
-
(e: AdapterError) => void
Inherited From CallWithChatAdapterSubscriptions.off
off("callIdChanged", CallIdChangedListener)
function off(event: "callIdChanged", listener: CallIdChangedListener)
Parameters
- event
-
"callIdChanged"
- listener
- CallIdChangedListener
Inherited From CallWithChatAdapterSubscriptions.off
off("callParticipantsJoined", ParticipantsJoinedListener)
function off(event: "callParticipantsJoined", listener: ParticipantsJoinedListener)
Parameters
- event
-
"callParticipantsJoined"
- listener
- ParticipantsJoinedListener
Inherited From CallWithChatAdapterSubscriptions.off
off("callParticipantsLeft", ParticipantsLeftListener)
function off(event: "callParticipantsLeft", listener: ParticipantsLeftListener)
Parameters
- event
-
"callParticipantsLeft"
- listener
- ParticipantsLeftListener
Inherited From CallWithChatAdapterSubscriptions.off
off("chatError", (e: AdapterError) => void)
function off(event: "chatError", listener: (e: AdapterError) => void)
Parameters
- event
-
"chatError"
- listener
-
(e: AdapterError) => void
Inherited From CallWithChatAdapterSubscriptions.off
off("chatParticipantsAdded", ParticipantsAddedListener)
function off(event: "chatParticipantsAdded", listener: ParticipantsAddedListener)
Parameters
- event
-
"chatParticipantsAdded"
- listener
- ParticipantsAddedListener
Inherited From CallWithChatAdapterSubscriptions.off
off("chatParticipantsRemoved", ParticipantsRemovedListener)
function off(event: "chatParticipantsRemoved", listener: ParticipantsRemovedListener)
Parameters
- event
-
"chatParticipantsRemoved"
- listener
- ParticipantsRemovedListener
Inherited From CallWithChatAdapterSubscriptions.off
off("displayNameChanged", DisplayNameChangedListener)
function off(event: "displayNameChanged", listener: DisplayNameChangedListener)
Parameters
- event
-
"displayNameChanged"
- listener
- DisplayNameChangedListener
Inherited From CallWithChatAdapterSubscriptions.off
off("isLocalScreenSharingActiveChanged", IsLocalScreenSharingActiveChangedListener)
function off(event: "isLocalScreenSharingActiveChanged", listener: IsLocalScreenSharingActiveChangedListener)
Parameters
- event
-
"isLocalScreenSharingActiveChanged"
Inherited From CallWithChatAdapterSubscriptions.off
off("isMutedChanged", IsMutedChangedListener)
function off(event: "isMutedChanged", listener: IsMutedChangedListener)
Parameters
- event
-
"isMutedChanged"
- listener
- IsMutedChangedListener
Inherited From CallWithChatAdapterSubscriptions.off
off("isSpeakingChanged", IsSpeakingChangedListener)
function off(event: "isSpeakingChanged", listener: IsSpeakingChangedListener)
Parameters
- event
-
"isSpeakingChanged"
- listener
- IsSpeakingChangedListener
Inherited From CallWithChatAdapterSubscriptions.off
off("messageRead", MessageReadListener)
function off(event: "messageRead", listener: MessageReadListener)
Parameters
- event
-
"messageRead"
- listener
- MessageReadListener
Inherited From CallWithChatAdapterSubscriptions.off
off("messageReceived", MessageReceivedListener)
function off(event: "messageReceived", listener: MessageReceivedListener)
Parameters
- event
-
"messageReceived"
- listener
- MessageReceivedListener
Inherited From CallWithChatAdapterSubscriptions.off
off("messageSent", MessageReceivedListener)
function off(event: "messageSent", listener: MessageReceivedListener)
Parameters
- event
-
"messageSent"
- listener
- MessageReceivedListener
Inherited From CallWithChatAdapterSubscriptions.off
off("selectedMicrophoneChanged", PropertyChangedEvent)
function off(event: "selectedMicrophoneChanged", listener: PropertyChangedEvent)
Parameters
- event
-
"selectedMicrophoneChanged"
- listener
- PropertyChangedEvent
Inherited From CallWithChatAdapterSubscriptions.off
off("selectedSpeakerChanged", PropertyChangedEvent)
function off(event: "selectedSpeakerChanged", listener: PropertyChangedEvent)
Parameters
- event
-
"selectedSpeakerChanged"
- listener
- PropertyChangedEvent
Inherited From CallWithChatAdapterSubscriptions.off
offStateChange((state: CallWithChatAdapterState) => void)
Unsubscribes the handler to stateChanged events.
function offStateChange(handler: (state: CallWithChatAdapterState) => void)
Parameters
- handler
-
(state: CallWithChatAdapterState) => void
Inherited From AdapterState.offStateChange
on("callEnded", CallEndedListener)
function on(event: "callEnded", listener: CallEndedListener)
Parameters
- event
-
"callEnded"
- listener
- CallEndedListener
Inherited From CallWithChatAdapterSubscriptions.on
on("callError", (e: AdapterError) => void)
function on(event: "callError", listener: (e: AdapterError) => void)
Parameters
- event
-
"callError"
- listener
-
(e: AdapterError) => void
Inherited From CallWithChatAdapterSubscriptions.on
on("callIdChanged", CallIdChangedListener)
function on(event: "callIdChanged", listener: CallIdChangedListener)
Parameters
- event
-
"callIdChanged"
- listener
- CallIdChangedListener
Inherited From CallWithChatAdapterSubscriptions.on
on("callParticipantsJoined", ParticipantsJoinedListener)
function on(event: "callParticipantsJoined", listener: ParticipantsJoinedListener)
Parameters
- event
-
"callParticipantsJoined"
- listener
- ParticipantsJoinedListener
Inherited From CallWithChatAdapterSubscriptions.on
on("callParticipantsLeft", ParticipantsLeftListener)
function on(event: "callParticipantsLeft", listener: ParticipantsLeftListener)
Parameters
- event
-
"callParticipantsLeft"
- listener
- ParticipantsLeftListener
Inherited From CallWithChatAdapterSubscriptions.on
on("chatError", (e: AdapterError) => void)
function on(event: "chatError", listener: (e: AdapterError) => void)
Parameters
- event
-
"chatError"
- listener
-
(e: AdapterError) => void
Inherited From CallWithChatAdapterSubscriptions.on
on("chatParticipantsAdded", ParticipantsAddedListener)
function on(event: "chatParticipantsAdded", listener: ParticipantsAddedListener)
Parameters
- event
-
"chatParticipantsAdded"
- listener
- ParticipantsAddedListener
Inherited From CallWithChatAdapterSubscriptions.on
on("chatParticipantsRemoved", ParticipantsRemovedListener)
function on(event: "chatParticipantsRemoved", listener: ParticipantsRemovedListener)
Parameters
- event
-
"chatParticipantsRemoved"
- listener
- ParticipantsRemovedListener
Inherited From CallWithChatAdapterSubscriptions.on
on("displayNameChanged", DisplayNameChangedListener)
function on(event: "displayNameChanged", listener: DisplayNameChangedListener)
Parameters
- event
-
"displayNameChanged"
- listener
- DisplayNameChangedListener
Inherited From CallWithChatAdapterSubscriptions.on
on("isLocalScreenSharingActiveChanged", IsLocalScreenSharingActiveChangedListener)
function on(event: "isLocalScreenSharingActiveChanged", listener: IsLocalScreenSharingActiveChangedListener)
Parameters
- event
-
"isLocalScreenSharingActiveChanged"
Inherited From CallWithChatAdapterSubscriptions.on
on("isMutedChanged", IsMutedChangedListener)
function on(event: "isMutedChanged", listener: IsMutedChangedListener)
Parameters
- event
-
"isMutedChanged"
- listener
- IsMutedChangedListener
Inherited From CallWithChatAdapterSubscriptions.on
on("isSpeakingChanged", IsSpeakingChangedListener)
function on(event: "isSpeakingChanged", listener: IsSpeakingChangedListener)
Parameters
- event
-
"isSpeakingChanged"
- listener
- IsSpeakingChangedListener
Inherited From CallWithChatAdapterSubscriptions.on
on("messageRead", MessageReadListener)
function on(event: "messageRead", listener: MessageReadListener)
Parameters
- event
-
"messageRead"
- listener
- MessageReadListener
Inherited From CallWithChatAdapterSubscriptions.on
on("messageReceived", MessageReceivedListener)
function on(event: "messageReceived", listener: MessageReceivedListener)
Parameters
- event
-
"messageReceived"
- listener
- MessageReceivedListener
Inherited From CallWithChatAdapterSubscriptions.on
on("messageSent", MessageReceivedListener)
function on(event: "messageSent", listener: MessageReceivedListener)
Parameters
- event
-
"messageSent"
- listener
- MessageReceivedListener
Inherited From CallWithChatAdapterSubscriptions.on
on("selectedMicrophoneChanged", PropertyChangedEvent)
function on(event: "selectedMicrophoneChanged", listener: PropertyChangedEvent)
Parameters
- event
-
"selectedMicrophoneChanged"
- listener
- PropertyChangedEvent
Inherited From CallWithChatAdapterSubscriptions.on
on("selectedSpeakerChanged", PropertyChangedEvent)
function on(event: "selectedSpeakerChanged", listener: PropertyChangedEvent)
Parameters
- event
-
"selectedSpeakerChanged"
- listener
- PropertyChangedEvent
Inherited From CallWithChatAdapterSubscriptions.on
onStateChange((state: CallWithChatAdapterState) => void)
Subscribes the handler to stateChanged events.
function onStateChange(handler: (state: CallWithChatAdapterState) => void)
Parameters
- handler
-
(state: CallWithChatAdapterState) => void
Inherited From AdapterState.onStateChange
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()
Inherited From CallWithChatAdapterManagement.queryCameras
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()
Inherited From CallWithChatAdapterManagement.queryMicrophones
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()
Inherited From CallWithChatAdapterManagement.querySpeakers
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>
Inherited From CallWithChatAdapterManagement.removeParticipant
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>
Inherited From CallWithChatAdapterManagement.sendMessage
sendReadReceipt(string)
Send a read receipt for a message.
function sendReadReceipt(chatMessageId: string): Promise<void>
Parameters
- chatMessageId
-
string
Returns
Promise<void>
Inherited From CallWithChatAdapterManagement.sendReadReceipt
sendTypingIndicator()
Send typing indicator in the thread.
function sendTypingIndicator(): Promise<void>
Returns
Promise<void>
Inherited From CallWithChatAdapterManagement.sendTypingIndicator
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>
Inherited From CallWithChatAdapterManagement.setCamera
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>
Inherited From CallWithChatAdapterManagement.setMicrophone
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>
Inherited From CallWithChatAdapterManagement.setSpeaker
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
Inherited From CallWithChatAdapterManagement.startCall
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>
Inherited From CallWithChatAdapterManagement.startCamera
startScreenShare()
Start sharing the screen during a call.
function startScreenShare(): Promise<void>
Returns
Promise<void>
Inherited From CallWithChatAdapterManagement.startScreenShare
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>
Inherited From CallWithChatAdapterManagement.stopCamera
stopScreenShare()
Stop sharing the screen.
function stopScreenShare(): Promise<void>
Returns
Promise<void>
Inherited From CallWithChatAdapterManagement.stopScreenShare
unmute()
Unmute the current user during the call or enable microphone locally.
function unmute(): Promise<void>
Returns
Promise<void>
Inherited From CallWithChatAdapterManagement.unmute
updateMessage(string, string, Record<string, string>)
Update a message content.
function updateMessage(messageId: string, content: string, metadata?: Record<string, string>): Promise<void>
Parameters
- messageId
-
string
- content
-
string
- metadata
-
Record<string, string>
Returns
Promise<void>
Inherited From CallWithChatAdapterManagement.updateMessage