Skip to main content

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

DeviceManager

Methods

createAudioInput()

static createAudioInput(device?, settings?): 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.

Returns

Promise<AudioInput>

A promise that resolves to an instance of AudioInput.

Defined in

ari/lib/utils/device-manager.d.ts:81


createVideoInput()

static createVideoInput(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:89


getDevice()

static getDevice(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()

static getInputDevice(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()

static getInputDeviceByName(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()

static getOutputDevice(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()

static getOutputDeviceByName(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()

static listAudioInputs(): Promise<Device[]>

Returns

Promise<Device[]>

Defined in

ari/lib/utils/device-manager.d.ts:25


listAudioOutputs()

static listAudioOutputs(): 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()

static listDevices(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