import { NativeEventEmitter } from 'react-native'; import { ConstrainDouble, RealtimeKitMediaStreamConstraints, RealtimeKitMediaTrackConstraints, MediaDeviceInfo } from './LocalMediaInterfaces'; export interface LocalAudioOptions { disableAP?: boolean; disableAEC?: boolean; disableNS?: boolean; disableAGC?: boolean; disableHPF?: boolean; } export declare const VIDEO_CONSTRAINTS: { qvga: { width: { ideal: number; }; height: { ideal: number; }; }; vga: { width: { ideal: number; }; height: { ideal: number; }; }; hd: { width: { ideal: number; }; height: { ideal: number; }; }; hd_cropped: { width: { ideal: number; }; height: { ideal: number; }; }; }; export declare const deviceChangeListener: NativeEventEmitter; /** * To initialize an instance of this class, use the * `.init()` static method. */ export default class LocalMediaUtils { #private; private constructor(); static init(): Promise; destruct(): Promise; static isDeviceListAvailable(): boolean; private static enumerateVideoDevices; private static enumerateAudioDevices; static getVideoConstraints(options?: { videoDeviceId?: string; videoTrackConstraints?: boolean | RealtimeKitMediaTrackConstraints; facingMode?: string; frameRate?: ConstrainDouble; }): RealtimeKitMediaStreamConstraints; private static getUserMediaWithTimeout; static getAudioTrack(): Promise; static getVideoTrack(constraints: RealtimeKitMediaStreamConstraints): Promise; static getScreenShareTracks(): Promise<{ video: import("@cloudflare/react-native-webrtc").MediaStreamTrack; audio: import("@cloudflare/react-native-webrtc").MediaStreamTrack; }>; static getAudioAndVideoTrack(constraints: RealtimeKitMediaStreamConstraints): Promise<{ audioTrack: import("@cloudflare/react-native-webrtc").MediaStreamTrack; videoTrack: import("@cloudflare/react-native-webrtc").MediaStreamTrack; }>; onDeviceChange(callback: (changedDevices: { added: MediaDeviceInfo[]; removed: MediaDeviceInfo[]; selectedDevice?: string; }, forceDeviceChange?: boolean) => void): void; repopulateAvailableDevices(): Promise; chooseAudioRoute(route: String): Promise; get availableDevices(): MediaDeviceInfo[]; getAvailableDevicesByKind(kind: string): MediaDeviceInfo[]; getDeviceById(deviceId: string, kind: 'audioinput' | 'audiooutput' | 'videoinput'): MediaDeviceInfo; /** * Returns all audio input devices (microphone devices). */ getAudioDevices(): Promise; /** * Returns all video input devices. */ getVideoDevices(): Promise; /** * Returns all audio output devices (speaker devices). */ getSpeakerDevices(): Promise<{ deviceId: string; label: string; kind: string; groupId: string; facing: string; toJSON(): any; }[]>; }