RTCPeerConnection.idl [plain text]
typedef RTCRtpTransceiverDirection RtpTransceiverDirection;
[
Conditional=WEB_RTC,
EnabledAtRuntime=PeerConnection
] dictionary RTCDataChannelInit {
boolean ordered = true;
unsigned short maxPacketLifeTime;
unsigned short maxRetransmits;
USVString protocol = "";
boolean negotiated = false;
[EnforceRange] unsigned short id;
};
[
Conditional=WEB_RTC,
EnabledAtRuntime=PeerConnection
] dictionary RTCCertificateParameters {
DOMString name;
DOMString hash;
DOMString namedCurve;
unsigned long modulusLength;
Uint8Array publicExponent;
double expires;
};
typedef (object or DOMString) AlgorithmIdentifier;
[
Conditional=WEB_RTC,
EnabledAtRuntime=PeerConnection,
ImplementedAs=RTCRtpTransceiverInit
] dictionary RTCRtpTransceiverInit {
RtpTransceiverDirection direction = "sendrecv";
sequence<MediaStream> streams = [];
sequence<RTCRtpEncodingParameters> sendEncodings = [];
};
[
ActiveDOMObject,
Conditional=WEB_RTC,
EnabledAtRuntime=PeerConnection,
ExportMacro=WEBCORE_EXPORT,
Exposed=Window
] interface RTCPeerConnection : EventTarget {
[CallWith=Document] constructor(optional RTCConfiguration configuration);
Promise<RTCSessionDescriptionInit> createOffer(optional RTCOfferOptions offerOptions);
Promise<RTCSessionDescriptionInit> createAnswer(optional RTCAnswerOptions answerOptions);
Promise<undefined> setLocalDescription(optional (RTCSessionDescriptionInit or RTCSessionDescription) description);
readonly attribute RTCSessionDescription? localDescription;
readonly attribute RTCSessionDescription? currentLocalDescription;
readonly attribute RTCSessionDescription? pendingLocalDescription;
Promise<undefined> setRemoteDescription((RTCSessionDescriptionInit or RTCSessionDescription) description);
readonly attribute RTCSessionDescription? remoteDescription;
readonly attribute RTCSessionDescription? currentRemoteDescription;
readonly attribute RTCSessionDescription? pendingRemoteDescription;
Promise<undefined> addIceCandidate((RTCIceCandidateInit or RTCIceCandidate) candidate);
readonly attribute RTCSignalingState signalingState;
readonly attribute RTCIceGatheringState iceGatheringState;
readonly attribute RTCIceConnectionState iceConnectionState;
readonly attribute RTCPeerConnectionState connectionState;
undefined restartIce();
RTCConfiguration getConfiguration();
[MayThrowException] undefined setConfiguration(RTCConfiguration configuration);
undefined close();
attribute EventHandler onnegotiationneeded;
attribute EventHandler onicecandidate;
attribute EventHandler onsignalingstatechange;
attribute EventHandler oniceconnectionstatechange;
attribute EventHandler onicegatheringstatechange;
attribute EventHandler onconnectionstatechange;
attribute EventHandler onicecandidateerror;
[CallWith=GlobalObject] static Promise<RTCCertificate> generateCertificate(AlgorithmIdentifier keygenAlgorithm);
sequence<RTCRtpSender> getSenders();
sequence<RTCRtpReceiver> getReceivers();
sequence<RTCRtpTransceiver> getTransceivers();
[MayThrowException] RTCRtpSender addTrack(MediaStreamTrack track, MediaStream... streams);
[MayThrowException] undefined removeTrack(RTCRtpSender sender);
[MayThrowException] RTCRtpTransceiver addTransceiver((MediaStreamTrack or DOMString) track, optional RTCRtpTransceiverInit init);
attribute EventHandler ontrack;
[MayThrowException] RTCDataChannel createDataChannel([LegacyNullToEmptyString] USVString label, optional RTCDataChannelInit options);
attribute EventHandler ondatachannel;
Promise<RTCStatsReport> getStats(optional MediaStreamTrack? selector = null);
};