UNPKG

react-video-call

Version:

ReactVideoCall is a simple yet powerful WebRTC-based video call component for React. It uses Firebase for signaling and supports both desktop and mobile views with minimal setup.

20 lines (19 loc) 854 B
import { FirebaseApp, FirebaseOptions } from 'firebase/app'; import { DocumentData, DocumentReference, Firestore, Unsubscribe } from 'firebase/firestore'; type OnUpdateCallback = (data: DocumentData | undefined) => void; export declare class FirebaseWrapper { _app: FirebaseApp; _db: Firestore; _roomName?: string; _roomRef?: DocumentReference<DocumentData, DocumentData>; _room: { [key: string]: boolean | string | object | null; }; constructor(config: FirebaseOptions); createRoom(roomName: string, ref: string): Promise<boolean>; joinRoom(roomName: string, onUpdateCb: OnUpdateCallback): Promise<Unsubscribe | undefined>; leaveRoom(): Promise<void>; updateRoom(action: string, data: boolean | string | object | null): Promise<void>; onRoomUpdate(cb: OnUpdateCallback): Unsubscribe; } export {};