atmoky Engage Server SDK is now available! Check out the documentation to learn more.
API Reference
Classes
DeviceManager

DeviceManager

Summary
Singleton class to manage media devices.
Remarks
This class can be used to get a list of available media devices both audio and video.
Example: Example to get a list of available audio devices
const devices = await DeviceManager.getInstance().getDevices('audioinput');
// or async
DeviceManager.getInstance().getDevices('audioinput').then((devices) => {
 // do something with devices
});

Methods

getDevices

Returns a list of available media devices.
Signature
getDevices(kind?: MediaDeviceKind, requestPermissions: boolean)
NameTypeDescription
kind optionalMediaDeviceKindOptional media device kind to filter by.
requestPermissionsbooleanWhether to request permissions if no devices are found.
Returns
Promise<MediaDeviceInfo[]> Promise resolving to a list of media devices.

getInstance

Returns the singleton instance of the DeviceManager.
Signature
getInstance()

atmoky Logo

© 2024 atmoky, GmbH.
All rights reserved.

We use cookies to measure and improve your browsing experience, and serve personalized ads or content.