CallAdapterDeviceManagement interface
Functionality for managing devices within a call.
Methods
ask |
Ask for permissions of devices. |
query |
Query for available camera devices. |
query |
Query for available microphone devices. |
query |
Query for available microphone devices. |
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. |
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
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()
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>
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>