import { Base } from '../base/Base'; export declare enum WebSocketBasicEvents { Config = "config", JoinRoom = "joinRoom", IsSetupDone = "setupDone", Ping = "ping", Pong = "pong", CloseRoomForceFully = "CloseRoomForceFully", AudioVideoPauseResume = "audioVideoPauseResume", OnStartMeetingCalled = "startMeetingCalled", OnStartParticipantMeetingCalled = "OnStartParticipantMeetingCalled", OnAudioVideoPauseResume = "audioVideoPauseResume", OnAudioVideoStatusUpdated = "audioVideoStatusUpdated", OnAudioUnblockRequest = "audioUnblock", OnVideoUnblockRequest = "videoUnblock", OnAudioBlockRequest = "audioBlock", OnVideoBlockRequest = "videoBlock", UpdateParticipantData = "UpdateParticipantData", UpdateParticipant = "updateParticipant", OnParticipantUpdated = "participantUpdated", OnNewJoinee = "newJoinee", OnUserOnFoundWhileReconnect = "onUserOnFoundWhileReconnect", OnRejoined = "OnRejoined", OnUserLeft = "userLeft", GetAllParticipant = "getParticipant", OnServerParticipants = "participants", GetMeetingStartTime = "getMeetingStartTime", OnMeetingStartTime = "meetingStartTime", GetOldMessages = "getOldMessages", OnOldMessages = "oldMessages", Message = "message", OnChat = "chat", SelfLeft = "selfLeft" } export declare enum WebrtcMessageType { SendOffer = "SendOffer", IceCandidate = "IceCandidate", WebrtcMessage = "WebrtcMessage", SendAnswer = "SendAnswer", NegotiationNeeded = "NegotiationNeeded" } export declare enum SFUMessageType { SFUMessage = "sfuMessage", GetRouterRtpCapabilities = "routerRtpCapabilities", ReloadSFUCleanUpDone = "ReloadSFUCleanUpDone", ReloadSFU = "reloadSFU", OnRouterRtpCapabilities = "onRouterRtpCapabilities", OnTransportConnect = "transportConnect", OnCreateTransports = "createTransports", OnTransportConnectDone = "transportConnectDone", OnSendTransport = "onSendTransport", OnConsumeTransport = "onConsumeTransport", OnTransportProduceSyncRequest = "transportProduceSync", OnTransportDataProduceSyncRequest = "dataTransportProduceSync", OnReadyToConsume = "readyToConsume", OnStartRTMP = "startRtmp", OnProducerClosed = "producerClosed", OnPauseProducer = "pauseProducer", OnResumeProducer = "resumeProducer", OnNewProducer = "onNewProducer", ConsumeProductId = "consumeProductId", OnServerConsumer = "onServerConsumer", ResumeConsumer = "resumeConsumer", PauseConsumer = "pauseConsumer", OnProduceSyncDone = "produceSyncDone", OnSpeakerChanged = "onSpeakerChanged", OnRestartIceCandidate = "restartIceCandidate", OnTrackEnded = "onTrackEnded", UpdateSpatialConsumer = "updateSpatialConsumer", OnRestartIceCandidateResponse = "onRestartIceCandidate", OnTransportNotFound = "onTransportNotFound", OnCreateTransportsForcefully = "OnCreateTransportsForcefully", GetAllProducers = "getAllProducers", OnAllProducers = "onAllProducers", OnAudioVolumeChanged = "OnAudioVolumeChanged", OnConsumerNotFound = "OnConsumerNotFound", OnProducerNotFound = "OnProducerNotFound", OnConsumerScoreChange = "OnConsumerScoreChange", OnProducerScoreChange = "OnProducerScoreChange", OnConsumerLayerChange = "OnConsumerLayerChange" } export type WebSocketEvents = SFUMessageType | WebSocketBasicEvents | WebrtcMessageType; export interface WebSocketMessageBody { type?: WebSocketEvents; data?: any; } export declare class WebsocketHandler extends Base { private websocketConnectionUrl?; private loadBalancerIpAddressForWebSocket?; private isEnded; private isWebSocketConnectionInProgress; private wss?; private connection; private isSetUpDone; private socketCheckTimeout?; private pingCheckTimeout?; private setUpTry; private pongData; private lastPingTimeStamp; private isNormalConnectionCalledWhileInPreconnectProcess; protected onObjectCreated(): void; cleanup(): Promise; startSocketConnection(isForPreConnect?: boolean, url?: string): Promise; private connect; isWebSocketInPreConnect(): boolean; isWebScoketConnectedWithoutSetup(): boolean; isWebScoketConnected(): boolean; sendSocketMessage(type: WebSocketEvents, data: any): void; reconnectOnInternetFailur(): void; private onWebSocketClosed; private tryToReconectSocket; private onSocketConnected; private socketSubscribeToTopic; private askIfSetupDone; private onMessage; onCloseTheRoomForcefully: (data: any) => Promise; private onSetupDone; private checkIfPingIsRunning; private isVideoCallControllerMessageType; }