import { IRtcSignal } from "../model/IRtcSignal"; import { IHasPeerConnection } from "./IHasPeerConnection"; import { IRtcConnectionConfigurationV1 } from "./models-v1/IRtcConnectionConfigurationV1"; import { IIceMode } from "./models/IIceMode"; import { IRtcSendConfiguration } from "./models/IRtcSendConfiguration"; import { IRtcStreamMessage } from "./models/IRtcStreamMessage"; import { IStreamControl } from "./models/IStreamControl"; export declare class RtcConnectionV1 implements IHasPeerConnection { peerConnection: RTCPeerConnection; private config; iceMode?: IIceMode; private readonly connectTimeoutMs; private readonly gatherIceTimeoutMs; private readonly pingUpdateTimeoutMs; private latestTtlStreamChannel?; private reliableStreamChannel?; private latestReliableStreamChannel?; private latestTryOnceStreamChannel?; private streamLatestTimestamp; private pingUpdateTimeout; private pingTimeMs; private lastMessageTimestamp; private connectTimeout; private gatherIceTimeout; private sessionMetrics; private closeCalled; private connectCalled; private sentOffer; private receivedIceCandidate; constructor(peerConnection: RTCPeerConnection, config: IRtcConnectionConfigurationV1); connect(): Promise; handleSignal(signal: IRtcSignal): Promise; /** * Sends a message to the remote peer. */ send(message: IRtcStreamMessage, config: IRtcSendConfiguration): void; controlRemoteStream(streamControl: IStreamControl): void; isActive(): boolean; /** * Checks that the peerConnection is connected * and all data channels exist and are open */ isReady(): boolean; /** * Checks that the peerConnection is closed and all * existing data channels are closed */ isClosed(): boolean; /** * Checks that either the peerConnection is inactive * or at least one of the the data channels exists and is inactive */ needsClosing(): boolean | undefined; close(): Promise; getPing(): number | undefined; getLastMessageTimestamp(): number | undefined; getSessionId(): string; getRemotePeer(): import("src").IRtcPeer; private initializeChannels; private sendOffer; private getChannelFromLabel; private sendOnChannel; private channelNotRecognized; private setupChannel; /** * Handles system messages (e.g., ping/pong). * Returns true if the message is a system message. */ private handleSystemMessage; private sendSystemMessage; private hasCapabilities; private isLatestMessage; }