UNPKG

@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

33 lines (27 loc) 840 B
import { HMSException } from '../error/HMSException'; export interface HMSDeviceChangeEvent { isUserSelection?: boolean; error?: HMSException; devices?: DeviceMap; selection?: Partial<MediaDeviceInfo>; internal?: boolean; type: 'audioOutput' | 'audioInput' | 'video'; } export enum DeviceType { videoInput = 'videoInput', audioInput = 'audioInput', audioOutput = 'audioOutput', } export interface DeviceMap { [DeviceType.audioInput]: MediaDeviceInfo[]; [DeviceType.audioOutput]: MediaDeviceInfo[]; [DeviceType.videoInput]: MediaDeviceInfo[]; } export interface DeviceChangeListener { onDeviceChange?(event: HMSDeviceChangeEvent): void; } export type SelectedDevices = { [DeviceType.audioInput]?: MediaDeviceInfo; [DeviceType.videoInput]?: MediaDeviceInfo; [DeviceType.audioOutput]?: MediaDeviceInfo; };