msg91-webrtc-call
Version:
**msg91-webrtc-call** is a lightweight JavaScript SDK that enables you to easily add peer-to-peer WebRTC audio/video calling functionality to your web applications.
21 lines (20 loc) • 641 B
TypeScript
declare class WebRTC {
private user;
private callId;
private status;
private eventListeners;
private userToken;
private callToken?;
constructor(userToken: string);
close(): void;
call(callToken: string): Promise<void>;
rejoinCall(callId: string): Promise<void>;
sendUserContext(data: any): Promise<void>;
on(event: string, callback: (data: any) => void): {
remove: () => void;
};
removeListener(channel: string, listener: any): void;
private emit;
}
declare const _default: (userToken: string, env?: "dev" | "test" | "prod") => WebRTC | undefined;
export default _default;