@100mslive/hms-video-store
Version:
@100mslive Core SDK which abstracts the complexities of webRTC while providing a reactive store for data management with a unidirectional data flow
32 lines (31 loc) • 1.01 kB
TypeScript
import { DeviceMap, SelectedDevices } from '../interfaces';
declare type DeviceInfo = {
deviceId?: string;
groupId?: string;
};
/**
* This class is to manage storing and retrieving selected devices
* from localstorage
* @internal
*/
declare class DeviceStorage {
private storage;
private remember;
private devices?;
private readonly TAG;
setDevices(devices: DeviceMap): void;
rememberDevices(value: boolean): void;
/**
* This will update the passed in type value in storage
* @param {string} type - One of audioInput | videoInput | audioOutput
* @param {DeviceInfo} param
* @returns {void}
*/
updateSelection(type: 'audioInput' | 'videoInput' | 'audioOutput', { deviceId, groupId }: DeviceInfo): void;
removeSelection(type: 'audioInput' | 'videoInput' | 'audioOutput'): void;
getSelection(): SelectedDevices | undefined;
cleanup(): void;
private isSame;
}
export declare const DeviceStorageManager: DeviceStorage;
export {};