type Options = RTCConfiguration & {
    host?: string;
    port?: number;
    path?: string;
    protocols?: string[];
};
type Status = 'pending' | 'ready' | 'connected' | 'closed';
declare class WebRTC {
    #private;
    ws: WebSocket;
    peer: RTCPeerConnection;
    constructor(options?: Options);
    get id(): string | undefined;
    get connected(): string[];
    get status(): Status;
    get iceConnectionState(): RTCIceConnectionState;
    get signalingState(): RTCSignalingState;
    get connectionState(): RTCPeerConnectionState;
    connect(id: string, label?: string): Promise<RTCDataChannel>;
    connectStream(id: string, stream: MediaStream): Promise<RTCPeerConnection>;
    onReady(fn: () => void): void;
    onConnection(fn: (ev: RTCDataChannelEvent) => void): void;
    onConnectionStream(fn: (ev: RTCTrackEvent) => void): void;
    destroy(): void;
}

export { WebRTC };
