vani-meeting-client
Version:
Vani Meeting Clinet SDK
85 lines (84 loc) • 3.92 kB
TypeScript
import { MessagePayload } from "..";
import { Participant } from "./Participant";
import { Track, TrackKind } from "./Track";
export declare enum VaniEvent {
OnInitDone = "onInitDone",
OnSocketError = "onSocketError",
OnSocketConnected = "onConnected",
OnSocketReconnectTimeOut = "onReconnectTimeOut",
OnSocketDisconnected = "onSocketDisconnected",
OnAskedToCloseTheRoom = "OnAskedToCloseTheRoom",
OnConnected = "onConnected",
OnConnectionBack = "connectionBack",
OnMeetingStartTime = "meetingStartTime",
OnPermissionError = "permissionError",
OnPermissionApproved = "permissionApproved",
OnDevicesChanged = "onDevicesChanged",
OnTrack = "onTrack",
OnTrackEnded = "onTrackEnded",
OnUserJoined = "onUserJoined",
OnUserLeft = "onUserLeft",
OnAllParticipants = "participants",
OnParticipantDataUpdated = "onParticipantDataUpdated",
OnAudioVideoStatusUpdated = "audioVideoStatusUpdated",
OnAudioBlocked = "onAudioBlocked",
OnVideoBlocked = "videoBlocked",
OnAudioUnblocked = "audioUnblocked",
OnVideoUnblocked = "videoUnblocked",
OnNewChatMessageReceived = "onNewChatMessageReceived",
OnOldMessages = "onOldMessages",
OnSpeakerChanged = "onSpeakerChanged",
OnAudioVolumeChanged = "OnAudioVolumeChanged",
OnNotReachable = "notReachable",
OnReconectionTimeout = "reconectionTimeout",
OnReconecting = "reconecting",
OnUserOnFoundWhileReconnect = "onUserOnFoundWhileReconnect",
OnNewPingFromServer = "OnNewPingFromServer"
}
interface VaniConnectionEvents {
[VaniEvent.OnInitDone]: () => any;
[VaniEvent.OnSocketError]: (error: any) => any;
[VaniEvent.OnSocketConnected]: () => any;
[VaniEvent.OnSocketReconnectTimeOut]: () => any;
[VaniEvent.OnConnected]: () => any;
[VaniEvent.OnConnectionBack]: () => any;
[VaniEvent.OnPermissionError]: (error: DOMException) => any;
[VaniEvent.OnPermissionApproved]: (forTrackKinds: TrackKind[]) => any;
[VaniEvent.OnDevicesChanged]: () => any;
[VaniEvent.OnUserJoined]: (participant: Participant) => any;
[VaniEvent.OnAudioVideoStatusUpdated]: (participant: Participant) => any;
[VaniEvent.OnUserLeft]: (participant: Participant) => any;
[VaniEvent.OnTrack]: (track: Track) => any;
[VaniEvent.OnTrackEnded]: (track: Track) => any;
[VaniEvent.OnAllParticipants]: (participants: Participant[]) => any;
[VaniEvent.OnParticipantDataUpdated]: (participants: Participant) => any;
[VaniEvent.OnMeetingStartTime]: (time: string) => any;
[VaniEvent.OnNewPingFromServer]: () => any;
[VaniEvent.OnOldMessages]: (messages: MessagePayload[]) => any;
[VaniEvent.OnNewChatMessageReceived]: (message: MessagePayload) => any;
[VaniEvent.OnSpeakerChanged]: (participant: Participant) => any;
[VaniEvent.OnAudioVolumeChanged]: (data: {
participant: Participant;
volume: any;
}) => any;
[VaniEvent.OnNotReachable]: () => any;
[VaniEvent.OnReconectionTimeout]: () => any;
[VaniEvent.OnReconecting]: () => any;
[VaniEvent.OnUserOnFoundWhileReconnect]: () => any;
[VaniEvent.OnVideoUnblocked]: (participant: Participant) => any;
[VaniEvent.OnAudioUnblocked]: (participant: Participant) => any;
[VaniEvent.OnVideoBlocked]: (participant: Participant) => any;
[VaniEvent.OnAudioBlocked]: (participant: Participant) => any;
[VaniEvent.OnSocketDisconnected]: () => any;
[VaniEvent.OnAskedToCloseTheRoom]: () => any;
}
export declare interface VaniEventListener {
on<U extends keyof VaniConnectionEvents>(event: U, listener: VaniConnectionEvents[U]): this;
off<U extends keyof VaniConnectionEvents>(event: U, listener: VaniConnectionEvents[U]): this;
emit<U extends keyof VaniConnectionEvents>(event: U, ...args: Parameters<VaniConnectionEvents[U]>): boolean;
}
export interface Device {
id: string;
label: string;
}
export {};