/// import { RTCPeerConnection as DefaultRTCPeerConnection } from 'wrtc'; import { ConnectionID } from './connectionManager'; import Connection from './connection'; export interface IWebRTCConnectionOptions { createRTCPeerConnection: (config: RTCConfiguration) => DefaultRTCPeerConnection; beforeOffer: (peerConnection: DefaultRTCPeerConnection) => void; clearTimeout: (timeoutId: NodeJS.Timeout) => void; setTimeout: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => NodeJS.Timeout; timeToConnected: number; timeToHostCandidates: number; timeToReconnected: number; } export declare class WebRTCConnection extends Connection { private peerConnection; private options; private connectionTimer; private reconnectionTimer; constructor(id: ConnectionID, options0?: Partial); private onIceConnectionStateChange; doOffer: () => Promise; applyAnswer: (answer: RTCSessionDescriptionInit) => Promise; close: () => void; toJSON: () => { iceConnectionState: RTCIceTransportState; localDescription: { type?: undefined; sdp?: undefined; } | { type: RTCSdpType; sdp: string; }; remoteDescription: { type?: undefined; sdp?: undefined; } | { type: RTCSdpType; sdp: string; }; signalingState: RTCSignalingState; id: string; state: ShadowRootMode; }; get iceConnectionState(): RTCIceConnectionState; get localDescription(): { type?: undefined; sdp?: undefined; } | { type: RTCSdpType; sdp: string; }; get remoteDescription(): { type?: undefined; sdp?: undefined; } | { type: RTCSdpType; sdp: string; }; get signalingState(): RTCSignalingState; }