Class: DeviceManager
The DeviceManager class provides a collection of static methods to interact with audio and video devices. It includes capabilities for listing available input/output devices and creating audio or video input instances.
Constructors
new DeviceManager()
new DeviceManager():
DeviceManager
Returns
Methods
createAudioInput()
staticcreateAudioInput(device?,settings?,customType?):Promise<AudioInput>
Creates an audio input instance using the specified device parameters and input settings.
Parameters
• device?: DeviceParameters
Optional parameters for selecting the audio capture device.
• settings?: InputSettings
Optional configuration settings for the audio input.
• customType?: string
Optional custom type for the audio input that's helping identify different AudioInputs.
Returns
Promise<AudioInput>
A promise that resolves to an instance of AudioInput.
Defined in
ari/lib/utils/device-manager.d.ts:82
createVideoInput()
staticcreateVideoInput(ms,options?):Promise<VideoInput>
Creates a new VideoInput instance from the given MediaStream and optional configuration.
Parameters
• ms: MediaStream
The MediaStream instance used to initialize the VideoInput.
• options?: VideoInputOptions
Optional configuration parameters for the VideoInput.
Returns
Promise<VideoInput>
A promise that resolves to the created VideoInput instance.
Defined in
ari/lib/utils/device-manager.d.ts:90
getDevice()
staticgetDevice(id):Promise<Device>
Retrieves an audio device by its id.
Parameters
• id: string
The id of the desired audio device.
Returns
Promise<Device>
A promise that resolves to the device object if a match is found, or undefined if no matching device is found.
Defined in
ari/lib/utils/device-manager.d.ts:73
getInputDevice()
staticgetInputDevice(id):Promise<Device>
Retrieves an input device by its id from the list of available audio input devices.
Parameters
• id: string
The id of the input device to search for.
Returns
Promise<Device>
A promise that resolves to the input device object if found, or undefined if no matching device is found.
Defined in
ari/lib/utils/device-manager.d.ts:59
getInputDeviceByName()
staticgetInputDeviceByName(name):Promise<Device>
Retrieves an input device by its name from the list of available audio input devices.
Parameters
• name: string
The name of the input device to search for.
Returns
Promise<Device>
A promise that resolves to the input device object if found, or undefined if no matching device is found.
Defined in
ari/lib/utils/device-manager.d.ts:45
getOutputDevice()
staticgetOutputDevice(id):Promise<Device>
Retrieves an audio output device by its id.
Parameters
• id: string
The id of the desired audio output device.
Returns
Promise<Device>
A promise that resolves to the device object if a match is found, or undefined if no matching device is found.
Defined in
ari/lib/utils/device-manager.d.ts:66
getOutputDeviceByName()
staticgetOutputDeviceByName(name):Promise<Device>
Retrieves an audio output device by its name.
Parameters
• name: string
The name of the desired audio output device.
Returns
Promise<Device>
A promise that resolves to the device object if a match is found, or undefined if no matching device is found.
Defined in
ari/lib/utils/device-manager.d.ts:52
listAudioInputs()
staticlistAudioInputs():Promise<Device[]>
Returns
Promise<Device[]>
Defined in
ari/lib/utils/device-manager.d.ts:25
listAudioOutputs()
staticlistAudioOutputs():Promise<Device[]>
Retrieves a list of audio output devices available on the system.
Returns
Promise<Device[]>
A promise that resolves to an array of Device objects representing the audio output devices.
Defined in
ari/lib/utils/device-manager.d.ts:31
listDevices()
staticlistDevices(kind?):Promise<Device[]>
Lists available devices, optionally filtered by the specified kind.
Parameters
• kind?: DeviceKinds
The type of devices to filter. If undefined, all devices will be listed.
Returns
Promise<Device[]>
A promise that resolves to an array of devices matching the specified kind.
Defined in
ari/lib/utils/device-manager.d.ts:38