StatefulDeviceManager interface
Defines the additional methods added by the stateful on top of <xref:%40azure%2Fcommunication-calling%23DeviceManager>.
- Extends
Properties
| get |
Gets the list of unparented video streams. This is a list of video streams that have not been added to a <xref:%40azure%2Fcommunication-calling%23Call>. This is useful for developers who want to interact with rendered video streams before they have started a call. See also <xref:%40azure%2Fcommunication-react%23CallClient.createView>. |
| select |
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
| is |
Whether the device host can select speaker output. |
| selected |
The microphone device that is being used. |
| selected |
The speaker device that is being used. |
Inherited Methods
| ask |
Show browser prompt to ask the front end user for permission to use the specified device. |
| get |
Get a list of available video devices for use. |
| get |
Get a list of available microphone devices for use. |
| get |
Get a list of available speaker devices for use. |
| off("audio |
Unsubscribe function for audioDevicesUpdated event. |
| off("selected |
Unsubscribe function for selectedMicrophoneChanged event. |
| off("selected |
Unsubscribe function for selectedSpeakerChanged event. |
| off("video |
Unsubscribe function for videoDevicesUpdated event. |
| on("audio |
Subscribe function for audioDevicesUpdated . |
| on("selected |
Subscribe function for selectedMicrophoneChanged event. |
| on("selected |
Subscribe function for selectedSpeakerChanged event. |
| on("video |
Subscribe function for videoDevicesUpdated event. |
| select |
Selects the microphone device to use. |
| select |
Select the speaker device to use. |
| start |
Start preheating devices. |
| stop |
Stop preheating devices. |
Property Details
getUnparentedVideoStreams
Gets the list of unparented video streams. This is a list of video streams that have not been added to a <xref:%40azure%2Fcommunication-calling%23Call>. This is useful for developers who want to interact with rendered video streams before they have started a call. See also <xref:%40azure%2Fcommunication-react%23CallClient.createView>.
public getUnparentedVideoStreams: () => LocalVideoStream[]
Property Value
() => LocalVideoStream[]
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: (device: VideoDeviceInfo) => void
Property Value
(device: VideoDeviceInfo) => 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
Configure 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
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
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
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
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
startPreheatDevices(StartPreheatDeviceParameters)
Start preheating devices.
function startPreheatDevices(parameters: StartPreheatDeviceParameters): Promise<void>
Parameters
- parameters
- @azure/communication-calling.StartPreheatDeviceParameters
Configures which devices (audio/video) to preheat.
Returns
Promise<void>
Inherited From DeviceManager.startPreheatDevices
stopPreheatDevices(StopPreheatDeviceParameters)
Stop preheating devices.
function stopPreheatDevices(parameters: StopPreheatDeviceParameters)
Parameters
- parameters
- @azure/communication-calling.StopPreheatDeviceParameters
Configures which devices (audio/video) to stop preheating.
Inherited From DeviceManager.stopPreheatDevices