CommonCallAdapter interface
CallComposite Adapter interface.
- Extends
Methods
join |
Join the call with microphone initially on/off. |
start |
Start the call. |
Inherited Methods
ask |
Ask for permissions of devices. |
create |
Create the html view for a stream. |
dispose() | Dispose of the Composite |
dispose |
Dispose the html view for a stream. |
get |
Get the current State |
leave |
Leave the call |
mute() | Mute the current user during the call or disable microphone locally |
off("call |
Unsubscribe function for 'callEnded' event. |
off("call |
Unsubscribe function for 'callIdChanged' event. |
off("diagnostic |
Unsubscribe function for 'diagnosticChanged' event. |
off("display |
Unsubscribe function for 'displayNameChanged' event. |
off("error", (e: Adapter |
Unsubscribe function for 'error' event. |
off("is |
Unsubscribe function for 'isLocalScreenSharingActiveChanged' event. |
off("is |
Unsubscribe function for 'isMutedChanged' event. |
off("is |
Unsubscribe function for 'isSpeakingChanged' event. |
off("participants |
Unsubscribe function for 'participantsJoined' event. |
off("participants |
Unsubscribe function for 'participantsLeft' event. |
off("selected |
Unsubscribe function for 'selectedMicrophoneChanged' event. |
off("selected |
Unsubscribe function for 'selectedSpeakerChanged' event. |
off |
Unsubscribes the handler to stateChanged events. |
on("call |
Subscribe function for 'callEnded' event. |
on("call |
Subscribe function for 'callIdChanged' event. |
on("diagnostic |
Subscribe function for 'diagnosticChanged' event. This event fires whenever there is a change in user facing diagnostics about the ongoing call. |
on("display |
Subscribe function for 'displayNameChanged' event. |
on("error", (e: Adapter |
Subscribe function for 'error' event. |
on("is |
Subscribe function for 'isLocalScreenSharingActiveChanged' event. |
on("is |
Subscribe function for 'isMutedChanged' event. |
on("is |
Subscribe function for 'isSpeakingChanged' event. |
on("participants |
Subscribe function for 'participantsJoined' event. |
on("participants |
Subscribe function for 'participantsLeft' event. |
on("selected |
Subscribe function for 'selectedMicrophoneChanged' event. This event fires whenever the user selects a new microphone device. |
on("selected |
Subscribe function for 'selectedSpeakerChanged' event. This event fires whenever the user selects a new speaker device. |
on |
Subscribes the handler to stateChanged events. |
query |
Query for available camera devices. |
query |
Query for available microphone devices. |
query |
Query for available microphone devices. |
remove |
Remove a participant from the call. |
set |
Set the camera to use in the call. |
set |
Set the microphone to use in the call. |
set |
Set the speaker to use in the call. |
start |
Start the camera This method will start rendering a local camera view when the call is not active |
start |
Start sharing the screen during a call. |
stop |
Stop the camera This method will stop rendering a local camera view when the call is not active |
stop |
Stop sharing the screen |
unmute() | Unmute the current user during the call or enable microphone locally |
Method Details
joinCall(boolean)
Join the call with microphone initially on/off.
function joinCall(microphoneOn?: boolean)
Parameters
- microphoneOn
-
boolean
Whether microphone is initially enabled
startCall(string[], StartCallOptions)
Start the call.
function startCall(participants: string[], options?: StartCallOptions)
Parameters
- participants
-
string[]
An array of participant ids to join
- options
- StartCallOptions
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 CallAdapterDeviceManagement.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 CallAdapterCallOperations.createStreamView
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 CallAdapterCallOperations.disposeStreamView
getState()
Get the current State
function getState(): CallAdapterState
Returns
Inherited From AdapterState.getState
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 CallAdapterCallOperations.leaveCall
mute()
Mute the current user during the call or disable microphone locally
function mute(): Promise<void>
Returns
Promise<void>
Inherited From CallAdapterCallOperations.mute
off("callEnded", CallEndedListener)
Unsubscribe function for 'callEnded' event.
function off(event: "callEnded", listener: CallEndedListener)
Parameters
- event
-
"callEnded"
- listener
- CallEndedListener
Inherited From CallAdapterSubscribers.off
off("callIdChanged", CallIdChangedListener)
Unsubscribe function for 'callIdChanged' event.
function off(event: "callIdChanged", listener: CallIdChangedListener)
Parameters
- event
-
"callIdChanged"
- listener
- CallIdChangedListener
Inherited From CallAdapterSubscribers.off
off("diagnosticChanged", DiagnosticChangedEventListner)
Unsubscribe function for 'diagnosticChanged' event.
function off(event: "diagnosticChanged", listener: DiagnosticChangedEventListner)
Parameters
- event
-
"diagnosticChanged"
- listener
- DiagnosticChangedEventListner
Inherited From CallAdapterSubscribers.off
off("displayNameChanged", DisplayNameChangedListener)
Unsubscribe function for 'displayNameChanged' event.
function off(event: "displayNameChanged", listener: DisplayNameChangedListener)
Parameters
- event
-
"displayNameChanged"
- listener
- DisplayNameChangedListener
Inherited From CallAdapterSubscribers.off
off("error", (e: AdapterError) => void)
Unsubscribe function for 'error' event.
function off(event: "error", listener: (e: AdapterError) => void)
Parameters
- event
-
"error"
- listener
-
(e: AdapterError) => void
Inherited From CallAdapterSubscribers.off
off("isLocalScreenSharingActiveChanged", IsLocalScreenSharingActiveChangedListener)
Unsubscribe function for 'isLocalScreenSharingActiveChanged' event.
function off(event: "isLocalScreenSharingActiveChanged", listener: IsLocalScreenSharingActiveChangedListener)
Parameters
- event
-
"isLocalScreenSharingActiveChanged"
Inherited From CallAdapterSubscribers.off
off("isMutedChanged", IsMutedChangedListener)
Unsubscribe function for 'isMutedChanged' event.
function off(event: "isMutedChanged", listener: IsMutedChangedListener)
Parameters
- event
-
"isMutedChanged"
- listener
- IsMutedChangedListener
Inherited From CallAdapterSubscribers.off
off("isSpeakingChanged", IsSpeakingChangedListener)
Unsubscribe function for 'isSpeakingChanged' event.
function off(event: "isSpeakingChanged", listener: IsSpeakingChangedListener)
Parameters
- event
-
"isSpeakingChanged"
- listener
- IsSpeakingChangedListener
Inherited From CallAdapterSubscribers.off
off("participantsJoined", ParticipantsJoinedListener)
Unsubscribe function for 'participantsJoined' event.
function off(event: "participantsJoined", listener: ParticipantsJoinedListener)
Parameters
- event
-
"participantsJoined"
- listener
- ParticipantsJoinedListener
Inherited From CallAdapterSubscribers.off
off("participantsLeft", ParticipantsLeftListener)
Unsubscribe function for 'participantsLeft' event.
function off(event: "participantsLeft", listener: ParticipantsLeftListener)
Parameters
- event
-
"participantsLeft"
- listener
- ParticipantsLeftListener
Inherited From CallAdapterSubscribers.off
off("selectedMicrophoneChanged", PropertyChangedEvent)
Unsubscribe function for 'selectedMicrophoneChanged' event.
function off(event: "selectedMicrophoneChanged", listener: PropertyChangedEvent)
Parameters
- event
-
"selectedMicrophoneChanged"
- listener
- PropertyChangedEvent
Inherited From CallAdapterSubscribers.off
off("selectedSpeakerChanged", PropertyChangedEvent)
Unsubscribe function for 'selectedSpeakerChanged' event.
function off(event: "selectedSpeakerChanged", listener: PropertyChangedEvent)
Parameters
- event
-
"selectedSpeakerChanged"
- listener
- PropertyChangedEvent
Inherited From CallAdapterSubscribers.off
offStateChange((state: CallAdapterState) => void)
Unsubscribes the handler to stateChanged events.
function offStateChange(handler: (state: CallAdapterState) => void)
Parameters
- handler
-
(state: CallAdapterState) => void
Inherited From AdapterState.offStateChange
on("callEnded", CallEndedListener)
Subscribe function for 'callEnded' event.
function on(event: "callEnded", listener: CallEndedListener)
Parameters
- event
-
"callEnded"
- listener
- CallEndedListener
Inherited From CallAdapterSubscribers.on
on("callIdChanged", CallIdChangedListener)
Subscribe function for 'callIdChanged' event.
function on(event: "callIdChanged", listener: CallIdChangedListener)
Parameters
- event
-
"callIdChanged"
- listener
- CallIdChangedListener
Remarks
The event will be triggered when callId of current user changed.
Inherited From CallAdapterSubscribers.on
on("diagnosticChanged", DiagnosticChangedEventListner)
Subscribe function for 'diagnosticChanged' event.
This event fires whenever there is a change in user facing diagnostics about the ongoing call.
function on(event: "diagnosticChanged", listener: DiagnosticChangedEventListner)
Parameters
- event
-
"diagnosticChanged"
- listener
- DiagnosticChangedEventListner
Inherited From CallAdapterSubscribers.on
on("displayNameChanged", DisplayNameChangedListener)
Subscribe function for 'displayNameChanged' event.
function on(event: "displayNameChanged", listener: DisplayNameChangedListener)
Parameters
- event
-
"displayNameChanged"
- listener
- DisplayNameChangedListener
Inherited From CallAdapterSubscribers.on
on("error", (e: AdapterError) => void)
Subscribe function for 'error' event.
function on(event: "error", listener: (e: AdapterError) => void)
Parameters
- event
-
"error"
- listener
-
(e: AdapterError) => void
Inherited From CallAdapterSubscribers.on
on("isLocalScreenSharingActiveChanged", IsLocalScreenSharingActiveChangedListener)
Subscribe function for 'isLocalScreenSharingActiveChanged' event.
function on(event: "isLocalScreenSharingActiveChanged", listener: IsLocalScreenSharingActiveChangedListener)
Parameters
- event
-
"isLocalScreenSharingActiveChanged"
Inherited From CallAdapterSubscribers.on
on("isMutedChanged", IsMutedChangedListener)
Subscribe function for 'isMutedChanged' event.
function on(event: "isMutedChanged", listener: IsMutedChangedListener)
Parameters
- event
-
"isMutedChanged"
- listener
- IsMutedChangedListener
Remarks
The event will be triggered whenever current user or remote user mute state changed
Inherited From CallAdapterSubscribers.on
on("isSpeakingChanged", IsSpeakingChangedListener)
Subscribe function for 'isSpeakingChanged' event.
function on(event: "isSpeakingChanged", listener: IsSpeakingChangedListener)
Parameters
- event
-
"isSpeakingChanged"
- listener
- IsSpeakingChangedListener
Inherited From CallAdapterSubscribers.on
on("participantsJoined", ParticipantsJoinedListener)
Subscribe function for 'participantsJoined' event.
function on(event: "participantsJoined", listener: ParticipantsJoinedListener)
Parameters
- event
-
"participantsJoined"
- listener
- ParticipantsJoinedListener
Inherited From CallAdapterSubscribers.on
on("participantsLeft", ParticipantsLeftListener)
Subscribe function for 'participantsLeft' event.
function on(event: "participantsLeft", listener: ParticipantsLeftListener)
Parameters
- event
-
"participantsLeft"
- listener
- ParticipantsLeftListener
Inherited From CallAdapterSubscribers.on
on("selectedMicrophoneChanged", PropertyChangedEvent)
Subscribe function for 'selectedMicrophoneChanged' event.
This event fires whenever the user selects a new microphone device.
function on(event: "selectedMicrophoneChanged", listener: PropertyChangedEvent)
Parameters
- event
-
"selectedMicrophoneChanged"
- listener
- PropertyChangedEvent
Inherited From CallAdapterSubscribers.on
on("selectedSpeakerChanged", PropertyChangedEvent)
Subscribe function for 'selectedSpeakerChanged' event.
This event fires whenever the user selects a new speaker device.
function on(event: "selectedSpeakerChanged", listener: PropertyChangedEvent)
Parameters
- event
-
"selectedSpeakerChanged"
- listener
- PropertyChangedEvent
Inherited From CallAdapterSubscribers.on
onStateChange((state: CallAdapterState) => void)
Subscribes the handler to stateChanged events.
function onStateChange(handler: (state: CallAdapterState) => void)
Parameters
- handler
-
(state: CallAdapterState) => 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 CallAdapterDeviceManagement.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 CallAdapterDeviceManagement.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 CallAdapterDeviceManagement.querySpeakers
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>
Inherited From CallAdapterCallOperations.removeParticipant
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 CallAdapterDeviceManagement.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 CallAdapterDeviceManagement.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 CallAdapterDeviceManagement.setSpeaker
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 CallAdapterCallOperations.startCamera
startScreenShare()
Start sharing the screen during a call.
function startScreenShare(): Promise<void>
Returns
Promise<void>
Inherited From CallAdapterCallOperations.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 CallAdapterCallOperations.stopCamera
stopScreenShare()
Stop sharing the screen
function stopScreenShare(): Promise<void>
Returns
Promise<void>
Inherited From CallAdapterCallOperations.stopScreenShare
unmute()
Unmute the current user during the call or enable microphone locally
function unmute(): Promise<void>
Returns
Promise<void>
Inherited From CallAdapterCallOperations.unmute