import { EventBus } from '../events/EventBus'; import { DeviceMap, SelectedDevices } from '../interfaces'; import { IStore } from '../sdk/store'; interface HMSDeviceManager extends DeviceMap { outputDevice?: MediaDeviceInfo; hasWebcamPermission: boolean; hasMicrophonePermission: boolean; } export declare class DeviceManager implements HMSDeviceManager { private store; private eventBus; audioInput: MediaDeviceInfo[]; audioOutput: MediaDeviceInfo[]; videoInput: MediaDeviceInfo[]; outputDevice?: MediaDeviceInfo; hasWebcamPermission: boolean; hasMicrophonePermission: boolean; private readonly TAG; private initialized; private videoInputChanged; private audioInputChanged; constructor(store: IStore, eventBus: EventBus); updateOutputDevice: (deviceId?: string) => Promise; init(force?: boolean): Promise; getDevices(): DeviceMap; cleanup(): void; getCurrentSelection: () => SelectedDevices; private createIdentifier; private computeChange; private enumerateDevices; private handleDeviceChange; /** * Function to get the device after device change * Chrome and Edge provide a default device from which we select the actual device * Firefox and safari give 0th device as system default * @returns {MediaDeviceInfo} */ getNewAudioInputDevice(): MediaDeviceInfo | undefined; /** * This method is to select the input/output from same group * same group meaning both input/output are of same device * This method might override the default coming from browser and system so as to select options from same * device type. This is required in certain cases where browser's default is not correct. * Algo: * 1. find the non default input device if selected one is default by matching device label * 2. find the corresponding output device which has the same group id or same label * 3. select the previous selected device if nothing was found * 4. select the default one if no matching device was found and previous device doesn't exist anymore * 5. select the first option if there is no default */ setOutputDevice(deviceChange?: boolean): Promise; private handleAudioInputDeviceChange; private handleVideoInputDeviceChange; private getAudioOutputDeviceMatchingInput; private logDevices; } export {};