import { DeviceType } from '@100mslive/hms-video-store'; import { hooksErrHandler } from '../hooks/types'; export declare type DeviceTypeAndInfo = { [key in DeviceType]?: T; }; export interface useDevicesResult { /** * list of all devices by type */ allDevices: DeviceTypeAndInfo; /** * selected device ids for all types */ selectedDeviceIDs: DeviceTypeAndInfo; /** * function to call to update device */ updateDevice: ({ deviceType, deviceId }: { deviceType: DeviceType; deviceId: string; }) => Promise; } /** * This hook can be used to implement a UI component which allows the user to manually change their * audio/video device. It returns the list of all devices as well as the currently selected one. The input * devices will be returned based on what the user is allowed to publish, so a audio only user won't get * the audioInput field. This can be used to show the UI dropdowns properly. * * Note: * - Browsers give access to the list of devices only if the user has given permission to access them * - Changing devices manually work best in combination with remembering the user's selection for the next time, do * pass the rememberDeviceSelection flag at time of join for this to happen. * * @param handleError error handler for any errors during device change */ export declare const useDevices: (handleError?: hooksErrHandler) => useDevicesResult;