StatefulDeviceManager interface

Defines the additional methods added by the stateful on top of <xref:%40azure%2Fcommunication-calling%23DeviceManager>.

Extends

Properties

selectCamera

Sets the selectedCamera in the DeviceManagerState. This is completely developer driven and is not tied in any way to <xref:%40azure%2Fcommunication-calling%23DeviceManager>. It is entirely contained in StatefulDeviceManager. See also <xref:DeviceManagerState.selectedCamera>.

Inherited Properties

isSpeakerSelectionAvailable

Whether the device host can select speaker output.

selectedMicrophone

The microphone device that is being used.

selectedSpeaker

The speaker device that is being used.

Inherited Methods

askDevicePermission(PermissionConstraints)

Show browser prompt to ask the front end user for permission to use the specified device.

getCameras()

Get a list of available video devices for use.

getMicrophones()

Get a list of available microphone devices for use.

getSpeakers()

Get a list of available speaker devices for use.

off("audioDevicesUpdated", CollectionUpdatedEvent<AudioDeviceInfo>)

Unsubscribe function for audioDevicesUpdated event.

off("selectedMicrophoneChanged", PropertyChangedEvent)

Unsubscribe function for selectedMicrophoneChanged event.

off("selectedSpeakerChanged", PropertyChangedEvent)

Unsubscribe function for selectedSpeakerChanged event.

off("videoDevicesUpdated", CollectionUpdatedEvent<VideoDeviceInfo>)

Unsubscribe function for videoDevicesUpdated event.

on("audioDevicesUpdated", CollectionUpdatedEvent<AudioDeviceInfo>)

Subscribe function for audioDevicesUpdated .

on("selectedMicrophoneChanged", PropertyChangedEvent)

Subscribe function for selectedMicrophoneChanged event.

on("selectedSpeakerChanged", PropertyChangedEvent)

Subscribe function for selectedSpeakerChanged event.

on("videoDevicesUpdated", CollectionUpdatedEvent<VideoDeviceInfo>)

Subscribe function for videoDevicesUpdated event.

selectMicrophone(AudioDeviceInfo)

Selects the microphone device to use.

selectSpeaker(AudioDeviceInfo)

Select the speaker device to use.

Property Details

selectCamera

Sets the selectedCamera in the DeviceManagerState. This is completely developer driven and is not tied in any way to <xref:%40azure%2Fcommunication-calling%23DeviceManager>. It is entirely contained in StatefulDeviceManager. See also <xref:DeviceManagerState.selectedCamera>.

selectCamera: (VideoDeviceInfo: any) => void

Property Value

(VideoDeviceInfo: any) => void

Inherited Property Details

isSpeakerSelectionAvailable

Whether the device host can select speaker output.

isSpeakerSelectionAvailable: boolean

Property Value

boolean

Inherited From DeviceManager.isSpeakerSelectionAvailable

selectedMicrophone

The microphone device that is being used.

selectedMicrophone?: AudioDeviceInfo

Property Value

Inherited From DeviceManager.selectedMicrophone

selectedSpeaker

The speaker device that is being used.

selectedSpeaker?: AudioDeviceInfo

Property Value

Inherited From DeviceManager.selectedSpeaker

Inherited Method Details

askDevicePermission(PermissionConstraints)

Show browser prompt to ask the front end user for permission to use the specified device.

function askDevicePermission(permissionConstraints: PermissionConstraints): Promise<DeviceAccess>

Parameters

permissionConstraints
PermissionConstraints

configures which permission (audio/video) to request.

Returns

Promise<DeviceAccess>

The permissions that were granted by the user.

Inherited From DeviceManager.askDevicePermission

getCameras()

Get a list of available video devices for use.

function getCameras(): Promise<VideoDeviceInfo[]>

Returns

Promise<VideoDeviceInfo[]>

Inherited From DeviceManager.getCameras

getMicrophones()

Get a list of available microphone devices for use.

function getMicrophones(): Promise<AudioDeviceInfo[]>

Returns

Promise<AudioDeviceInfo[]>

Inherited From DeviceManager.getMicrophones

getSpeakers()

Get a list of available speaker devices for use.

function getSpeakers(): Promise<AudioDeviceInfo[]>

Returns

Promise<AudioDeviceInfo[]>

Inherited From DeviceManager.getSpeakers

off("audioDevicesUpdated", CollectionUpdatedEvent<AudioDeviceInfo>)

Unsubscribe function for audioDevicesUpdated event.

function off(event: "audioDevicesUpdated", listener: CollectionUpdatedEvent<AudioDeviceInfo>)

Parameters

event

"audioDevicesUpdated"

event name.

listener

CollectionUpdatedEvent<AudioDeviceInfo>

callback fn that was used to subscribe to this event.

Inherited From DeviceManager.off

off("selectedMicrophoneChanged", PropertyChangedEvent)

Unsubscribe function for selectedMicrophoneChanged event.

function off(event: "selectedMicrophoneChanged", listener: PropertyChangedEvent)

Parameters

event

"selectedMicrophoneChanged"

event name.

listener
PropertyChangedEvent

callback fn that will be called when value of this property will change.

Inherited From DeviceManager.off

off("selectedSpeakerChanged", PropertyChangedEvent)

Unsubscribe function for selectedSpeakerChanged event.

function off(event: "selectedSpeakerChanged", listener: PropertyChangedEvent)

Parameters

event

"selectedSpeakerChanged"

event name.

listener
PropertyChangedEvent

callback fn that will be called when value of this property will change.

Inherited From DeviceManager.off

off("videoDevicesUpdated", CollectionUpdatedEvent<VideoDeviceInfo>)

Unsubscribe function for videoDevicesUpdated event.

function off(event: "videoDevicesUpdated", listener: CollectionUpdatedEvent<VideoDeviceInfo>)

Parameters

event

"videoDevicesUpdated"

event name.

listener

CollectionUpdatedEvent<VideoDeviceInfo>

callback fn that was used to subscribe to this event.

Inherited From DeviceManager.off

on("audioDevicesUpdated", CollectionUpdatedEvent<AudioDeviceInfo>)

Subscribe function for audioDevicesUpdated .

function on(event: "audioDevicesUpdated", listener: CollectionUpdatedEvent<AudioDeviceInfo>)

Parameters

event

"audioDevicesUpdated"

event name.

listener

CollectionUpdatedEvent<AudioDeviceInfo>

callback fn that will be called when this collection will change, it will pass arrays of added and removed elements.

Inherited From DeviceManager.on

on("selectedMicrophoneChanged", PropertyChangedEvent)

Subscribe function for selectedMicrophoneChanged event.

function on(event: "selectedMicrophoneChanged", listener: PropertyChangedEvent)

Parameters

event

"selectedMicrophoneChanged"

event name.

listener
PropertyChangedEvent

callback fn that will be called when value of this property will change.

Inherited From DeviceManager.on

on("selectedSpeakerChanged", PropertyChangedEvent)

Subscribe function for selectedSpeakerChanged event.

function on(event: "selectedSpeakerChanged", listener: PropertyChangedEvent)

Parameters

event

"selectedSpeakerChanged"

event name.

listener
PropertyChangedEvent

callback fn that will be called when value of this property will change.

Inherited From DeviceManager.on

on("videoDevicesUpdated", CollectionUpdatedEvent<VideoDeviceInfo>)

Subscribe function for videoDevicesUpdated event.

function on(event: "videoDevicesUpdated", listener: CollectionUpdatedEvent<VideoDeviceInfo>)

Parameters

event

"videoDevicesUpdated"

event name.

listener

CollectionUpdatedEvent<VideoDeviceInfo>

callback fn that will be called when this collection will change, it will pass arrays of added and removed elements.

Inherited From DeviceManager.on

selectMicrophone(AudioDeviceInfo)

Selects the microphone device to use.

function selectMicrophone(microphoneDevice: AudioDeviceInfo): Promise<void>

Parameters

microphoneDevice
AudioDeviceInfo

Microphone device information.

Returns

Promise<void>

Inherited From DeviceManager.selectMicrophone

selectSpeaker(AudioDeviceInfo)

Select the speaker device to use.

function selectSpeaker(speakerDevice: AudioDeviceInfo): Promise<void>

Parameters

speakerDevice
AudioDeviceInfo

Speaker device information.

Returns

Promise<void>

Inherited From DeviceManager.selectSpeaker