@ipshipyard/node-datachannel
Version:
WebRTC For Node.js and Electron. libdatachannel node bindings.
54 lines (51 loc) • 3.18 kB
TypeScript
import { PeerConnection } from '../lib/index';
import RTCCertificate from './RTCCertificate.js';
interface RTCConfiguration extends globalThis.RTCConfiguration {
peerIdentity?: string;
peerConnection?: PeerConnection;
}
declare class RTCPeerConnection extends EventTarget implements globalThis.RTCPeerConnection {
#private;
static generateCertificate(): Promise<RTCCertificate>;
onconnectionstatechange: ((this: globalThis.RTCPeerConnection, ev: Event) => any) | null;
ondatachannel: ((this: globalThis.RTCPeerConnection, ev: globalThis.RTCDataChannelEvent) => any) | null;
onicecandidate: ((this: globalThis.RTCPeerConnection, ev: globalThis.RTCPeerConnectionIceEvent) => any) | null;
onicecandidateerror: ((this: globalThis.RTCPeerConnection, ev: Event) => any) | null;
oniceconnectionstatechange: ((this: globalThis.RTCPeerConnection, ev: Event) => any) | null;
onicegatheringstatechange: ((this: globalThis.RTCPeerConnection, ev: Event) => any) | null;
onnegotiationneeded: ((this: globalThis.RTCPeerConnection, ev: Event) => any) | null;
onsignalingstatechange: ((this: globalThis.RTCPeerConnection, ev: Event) => any) | null;
ontrack: ((this: globalThis.RTCPeerConnection, ev: globalThis.RTCTrackEvent) => any) | null;
private _checkConfiguration;
setConfiguration(config: globalThis.RTCConfiguration): void;
constructor(config?: RTCConfiguration);
get canTrickleIceCandidates(): boolean | null;
get connectionState(): globalThis.RTCPeerConnectionState;
get iceConnectionState(): globalThis.RTCIceConnectionState;
get iceGatheringState(): globalThis.RTCIceGatheringState;
get currentLocalDescription(): globalThis.RTCSessionDescription;
get currentRemoteDescription(): globalThis.RTCSessionDescription;
get localDescription(): globalThis.RTCSessionDescription;
get pendingLocalDescription(): globalThis.RTCSessionDescription;
get pendingRemoteDescription(): globalThis.RTCSessionDescription;
get remoteDescription(): globalThis.RTCSessionDescription;
get sctp(): globalThis.RTCSctpTransport;
get signalingState(): globalThis.RTCSignalingState;
addIceCandidate(candidate?: globalThis.RTCIceCandidateInit | null): Promise<void>;
addTrack(_track: any, ..._streams: any[]): globalThis.RTCRtpSender;
addTransceiver(_trackOrKind: any, _init: any): globalThis.RTCRtpTransceiver;
close(): void;
createAnswer(): Promise<globalThis.RTCSessionDescriptionInit | any>;
createDataChannel(label: any, opts?: {}): globalThis.RTCDataChannel;
createOffer(): Promise<globalThis.RTCSessionDescriptionInit | any>;
getConfiguration(): globalThis.RTCConfiguration;
getReceivers(): globalThis.RTCRtpReceiver[];
getSenders(): globalThis.RTCRtpSender[];
getStats(): Promise<globalThis.RTCStatsReport>;
getTransceivers(): globalThis.RTCRtpTransceiver[];
removeTrack(): void;
restartIce(): Promise<void>;
setLocalDescription(description: globalThis.RTCSessionDescriptionInit): Promise<void>;
setRemoteDescription(description: globalThis.RTCSessionDescriptionInit): Promise<void>;
}
export { RTCPeerConnection as default };