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 = [];
};
[
ActiveDOMObject,
Conditional=WEB_RTC,
ConstructorCallWith=Document,
EnabledAtRuntime=PeerConnection,
ExportMacro=WEBCORE_EXPORT,
JSBuiltinConstructor
] interface RTCPeerConnection : EventTarget {
[PrivateIdentifier, CallWith=Document, MayThrowException] void initializeWith(RTCConfiguration configuration);
[JSBuiltin] Promise<RTCSessionDescriptionInit> createOffer(optional RTCOfferOptions offerOptions);
[JSBuiltin] Promise<RTCSessionDescriptionInit> createAnswer(optional RTCAnswerOptions answerOptions);
[JSBuiltin] Promise<void> setLocalDescription(RTCSessionDescriptionInit description);
readonly attribute RTCSessionDescription? localDescription;
readonly attribute RTCSessionDescription? currentLocalDescription;
readonly attribute RTCSessionDescription? pendingLocalDescription;
[JSBuiltin] Promise<void> setRemoteDescription(RTCSessionDescriptionInit description);
readonly attribute RTCSessionDescription? remoteDescription;
readonly attribute RTCSessionDescription? currentRemoteDescription;
readonly attribute RTCSessionDescription? pendingRemoteDescription;
[JSBuiltin] Promise<void> addIceCandidate((RTCIceCandidateInit or RTCIceCandidate) candidate);
readonly attribute RTCSignalingState signalingState;
readonly attribute RTCIceGatheringState iceGatheringState;
readonly attribute RTCIceConnectionState iceConnectionState;
readonly attribute RTCPeerConnectionState connectionState;
RTCConfiguration getConfiguration();
[MayThrowException] void setConfiguration(RTCConfiguration configuration);
void close();
attribute EventHandler onnegotiationneeded;
attribute EventHandler onicecandidate;
attribute EventHandler onsignalingstatechange;
attribute EventHandler oniceconnectionstatechange;
attribute EventHandler onicegatheringstatechange;
attribute EventHandler onconnectionstatechange;
[PrivateIdentifier] Promise<RTCSessionDescriptionInit> queuedCreateOffer(optional RTCOfferOptions offerOptions);
[PrivateIdentifier] Promise<RTCSessionDescriptionInit> queuedCreateAnswer(optional RTCAnswerOptions answerOptions);
[PrivateIdentifier] Promise<void> queuedSetLocalDescription(RTCSessionDescription description);
[PrivateIdentifier] Promise<void> queuedSetRemoteDescription(RTCSessionDescription description);
[PrivateIdentifier] Promise<void> queuedAddIceCandidate(RTCIceCandidate? candidate);
[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] void removeTrack(RTCRtpSender sender);
[MayThrowException] RTCRtpTransceiver addTransceiver((MediaStreamTrack or DOMString) track, optional RTCRtpTransceiverInit init);
attribute EventHandler ontrack;
[MayThrowException] RTCDataChannel createDataChannel([TreatNullAs=EmptyString] USVString label, optional RTCDataChannelInit options);
attribute EventHandler ondatachannel;
Promise<RTCStatsReport> getStats(optional MediaStreamTrack? selector = null);
};