import { Connection, Candidate } from "../../vendor/ice"; import Event from "rx.mini"; export declare type IceState = "new" | "gathering" | "stateChange" | "completed" | "closed" | "checking" | "failed" | "disconnected"; export declare class RTCIceGatherer { subject: Event; private _state; connection: Connection; constructor(stunServer?: [string, number]); get state(): IceState; gather(): Promise; getLocalCandidates(): RTCIceCandidate[]; getLocalParameters(): RTCIceParameters; private setState; } export declare function candidateFromIce(c: Candidate): RTCIceCandidate; export declare function candidateToIce(x: RTCIceCandidate): Candidate; export declare class RTCIceCandidate { component: number; foundation: string; ip: string; port: number; priority: number; protocol: string; type: string; relatedAddress?: string; relatedPort?: number; sdpMid?: unknown; sdpMLineIndex?: unknown; tcpType?: string; constructor(component: number, foundation: string, ip: string, port: number, priority: number, protocol: string, type: string); } export declare class RTCIceParameters { iceLite: boolean; usernameFragment?: string; password?: string; constructor(props: Partial); } export declare class RTCIceTransport { private gather; iceState: Event; private waitStart?; private _state; connection: Connection; roleSet: boolean; constructor(gather: RTCIceGatherer); get iceGather(): RTCIceGatherer; get role(): "controlling" | "controlled"; get state(): IceState; private setState; addRemoteCandidate: (candidate?: RTCIceCandidate) => void; start(remoteParameters: RTCIceParameters): Promise; stop(): Promise; }