Files
palemoon27/dom/webidl/RTCPeerConnection.webidl
roytam1 946864fcd3 import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1263188 - stop bleeding, r=yzen (e121b0dff3)
- Bug 1263188 - more assertions, part3, r=yzen (6623350334)
- Bug 1263188 - fix event tree coalescence, part4, r=yzen (dd4b0293ab)
- Bug 1262417 - bind a value change event with reorder event firing, r=yzen (eee45f738e)
- Bug 1287874: Add missing math.h include. r=drno (cd8b7e74d3)
- Bug 967300 - enable cairo's atomic support on gcc-esque compilers; r=mshal (025d886e53)
- Bug 1158871 - use new-style __atomic_* primitives in cairo; r=jrmuizel,ted.mielczarek (9ac76e7769)
- fix build on non-windows systems (d807139c54)
- Bug 1205854 - Workaround for Windows printer drivers that can't handle swapped X and Y axes. r=jrmuizel (1f35fc8d76)
- Bug 1186339 - skip STUN/TURN servers with non-matching IP versions for TCP sockets. r=bwc (61f841554e)
- Bug 933986. Switch over from index to an id, and ensure uniqueness when feeding into the candidate priority calculation. r=drno (168f4d68a3)
- Bug 1190720 - only check IP version for STUN server IPs. r=bwc (9f95c5995f)
- Bug 1192403 - improve ICE TCP error message. r=mjf (28afcf181c)
- Bug 1037618 - Part 1: Add some logging to highlight TCP connection failures. r=drno (f5f861563a)
- Bug 1251214: Ignore R_WOULDBLOCK in nr_stun_client_send_request r=ekr (00db6e3022)
- Bug 980609: Do not assert that TURN TCP client contexts can't fail before attempting to allocate. r=ekr (3c20586954)
- Bug 1237299: addedd missing address family to DNS lookup for proxies r=bwc (eea322d3e1)
- Bug 1258753: Base candidate pair priority on controlling/controlled. r=drno (52dc0783ca)
- Bug 1246363: add logging to detect if relay only option is set. r=mjf (fab0c5aec8)
- Bug 1252777: skip over ICE TCP host candidate creation failures. r=bwc (2225289e5e)
- Bug 1242324: Give VP9 priority over vp8 when both are enabled r=drno (5e31cde0b1)
- Bug 1247656: Make sure that remote reoffer does not change the media type of an m-line. r=drno (d34bd649b3)
- Bug 906986 - Ice restart and tests. r=bwc, r=drno, r=smaug (080ee96a4c)
- Bug 1259842: allow RFC1918 pairing again r=mjf (ab11d2a41a)
- Bug 1233181: improve misleading log message about missing STUN & TURN servers. r?=mjf (f744195587)
- Bug 1244338 - Don't try to clean up |ctx| if null. r=drno (4c7da59d2e)
- Bug 1256720: Remove a bad assertion, and simplify some code. r=drno (e8f5d04e93)
- Bug 1257472: Forgive rport of 0. r=drno,ekr (8d02b24855)
- Bug 1214279: Fix the same infinite loop from bug 957236 in a different place. r=drno (9780450268)
- Bug 1229633: hash interface names on Windows. r=ekr (6ff60bf22a)
- Bug 895793: added interface type and link speed detection for Windows. r=bwc (f7783adae6)
- Bug 1180311 - Add null check to ifa_addr. r=ekr (90658f741b)
- Bug 1183985: Fixed WebRTC socket leak on Linux. r=bwc (b06efe6ee9)
- Bug 1231117 - Use xlocale on DragonFly as well. r=jesup (e7a09ee751)
- Bug 1254780 (attempt 2) - Shrink log_types from 1024 entries to 16. r=ekr. (efa73ca5af)
- Bug 1187075: Implement cairo atomics for Win32. r=jrmuizel (5b92bd3cff)
- Bug 1161170 - backport upstream fix for race in Cairo freed_pool. r=jrmuizel (3287e5b154)
- Bug 1255269. Get rid of nsITCPSocketCallback.fireDataEvent. r=jdm (9460469c15)
- Bug 1246925 - log filtering_type and mapping_type only if they are valid pointers. r=ekr (57af98cd1f)
- Bug 1248637: Prune duplicate CANCELLED candidate pairs. r=drno (c982b8492d)
- Bug 676001 - Fix for stroke hit testing on cairo. r=jrmuizel (1cedebd554)
- Bug 1252171: Update last_used_ on TCP port mappings when they are used, similar to UDP. r=drno (9229a3316a)
- Bug 906986 - Rework rollback/finalize to include a committed state. r=bwc, r=drno (14ec947fd3)
- Bug 1264344 - Don't restart ICE on first CreateOffer call if iceRestart option is true. r=bwc (d2850773f6)
- Bug 1208371 - Update sink identity after adding track. r=mt (032aa5fcc4)
- Bug 1247547: removed double accounting for WEBRTC_ICE_ADD_CANDIDATE telemetry probes. r=bwc (5abdc7d93a)
- Bug 1254691 - Remove SEC_NORMAL from webrtc/. r=bwc (20dfff4efd)
- Bug 1264351: removed hand break which disables ICE TCP on e10s r=jesup (6bc2a9936d)
- bit of  Bug 906986 - Rework rollback/finalize (ab1f5378f2)
- Bug 1161619: RunStatsQuery leak fix. r=jib (2e4aca6869)
- Bug 1256430: start AEC log independently of webrtc TRACE r=jesup,pkerr (29978d0a69)
- Bug 1260784 - fix Stop Debug Mode button r=jesup (a1ac6fb833)
- Bug 1220043 - Add workaround for internal complier error by VS2015. r=rjesup (c4368b1cad)
- Bug 1252073 - Uninitialised value uses in mozilla::EncodingConstraints::operator==. r=docfaraday@gmail.com. (1be0174cd9)
- Bug 1179859 - Fix _cairo_box_intersects_line_segment early rejection tests. r=jrmuizel (b2493a8c1e)
- Bug 1186040 - use XPCOM refcounting macros instead of mozilla::RefCounted in WebrtcGlobalParent.h; r=jesup (f9bb1ba504)
- Bug 1188407: switch packetloss to a rate from total-packets-lost-per-update r=jib (96297c4cd7)
- Bug 1202696 - check surface status in _cairo_surface_get_extents. r=jmuizelaar (3f5c49d9d5)
- Bug 1207750 - setting an environment variable will let us crash as Cairo errors happen. r=bschouten (caf8d9ee9a)
- Bug 1215774 - use abort() to abort on error in Cairo. r=jmuizelaar (36e9c0bb2b)
- minor (d2d4a96024)
- Bug 1246011: fixed PT comparising for PT's without rtpmap. r=jesup (38c1f91a1f)
- Bug 1249098: Support maxplaybackrate for opus. r=jesup (7a38717c47)
- Bug 818618: Honor (and emit) opus stereo fmtp param. r=jesup (436175287f)
- Bug 1258558 - Don't check extents for empty regions. r=jrmuizel (3751780ae0)
- Bug 1236266 - Don't generate invalid empty regions in pixman (r=jmuielaar) (2c22835afd)
- Bug 1255281. Add pixman fast path for bilinear x888_8888_SRC. r=lsalzman (0e585d5114)
- Bug 1241012: Remove moz-d2d1-1.h stub headers from the tree. r=jrmuizel  Please enter the commit message for your changes. Lines starting (b1dc61c08b)
- Bug 1240790: Add newlines to WEBRTC_TRACE_FILE. r=rjesup (d25a696ff8)
- bug 1241064 - updating stats filter SSRC when audio channel SSRC changes; r=jib (481c2ad1e0)
- Bug 1247574: Force webrtc audio input processing to resample to target rate to fix 16KHz mics. r=padenot (9dea99341e)
- Bug 1158741 - Implement a version of omxSP_FFTInv_CCSToR_F32_Sfs in openmax DL's FFT that is not scaled r=padenot (0acefaf93a)
- Bug 1253149 - Use bool instead of int for boolean return values. r=SimonSapin (0303c4c8ab)
2024-06-07 10:07:03 +08:00

186 lines
7.1 KiB
Plaintext

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* http://w3c.github.io/webrtc-pc/#interface-definition
*/
callback RTCSessionDescriptionCallback = void (RTCSessionDescription sdp);
callback RTCPeerConnectionErrorCallback = void (DOMError error);
callback VoidFunction = void ();
callback RTCStatsCallback = void (RTCStatsReport report);
enum RTCSignalingState {
"stable",
"have-local-offer",
"have-remote-offer",
"have-local-pranswer",
"have-remote-pranswer",
"closed"
};
enum RTCIceGatheringState {
"new",
"gathering",
"complete"
};
enum RTCIceConnectionState {
"new",
"checking",
"connected",
"completed",
"failed",
"disconnected",
"closed"
};
dictionary RTCDataChannelInit {
boolean ordered = true;
unsigned short? maxRetransmitTime = null;
unsigned short? maxRetransmits = null;
DOMString protocol = "";
boolean negotiated = false; // spec currently says 'true'; we disagree
unsigned short? id = null;
// these are deprecated due to renaming in the spec, but still supported for Fx22
boolean outOfOrderAllowed; // now ordered, and the default changes to keep behavior the same
unsigned short maxRetransmitNum; // now maxRetransmits
boolean preset; // now negotiated
unsigned short stream; // now id
};
dictionary RTCOfferAnswerOptions {
// boolean voiceActivityDetection = true; // TODO: support this (Bug 1184712)
};
dictionary RTCAnswerOptions : RTCOfferAnswerOptions {
};
dictionary RTCOfferOptions : RTCOfferAnswerOptions {
long offerToReceiveVideo;
long offerToReceiveAudio;
boolean iceRestart = false;
// Mozilla proprietary options (at risk: Bug 1196974)
boolean mozDontOfferDataChannel;
boolean mozBundleOnly;
// TODO: Remove old constraint-like RTCOptions support soon (Bug 1064223).
DeprecatedRTCOfferOptionsSet mandatory;
sequence<DeprecatedRTCOfferOptionsSet> _optional;
};
dictionary DeprecatedRTCOfferOptionsSet {
boolean OfferToReceiveAudio; // Note the uppercase 'O'
boolean OfferToReceiveVideo; // Note the uppercase 'O'
boolean MozDontOfferDataChannel; // Note the uppercase 'M'
boolean MozBundleOnly; // Note the uppercase 'M'
};
interface RTCDataChannel;
[Pref="media.peerconnection.enabled",
JSImplementation="@mozilla.org/dom/peerconnection;1",
Constructor (optional RTCConfiguration configuration,
optional object? constraints)]
interface RTCPeerConnection : EventTarget {
[Throws, StaticClassOverride="mozilla::dom::RTCCertificate"]
static Promise<RTCCertificate> generateCertificate (AlgorithmIdentifier keygenAlgorithm);
[Pref="media.peerconnection.identity.enabled"]
void setIdentityProvider (DOMString provider,
optional DOMString protocol,
optional DOMString username);
[Pref="media.peerconnection.identity.enabled"]
Promise<DOMString> getIdentityAssertion();
Promise<RTCSessionDescription> createOffer (optional RTCOfferOptions options);
Promise<RTCSessionDescription> createAnswer (optional RTCAnswerOptions options);
Promise<void> setLocalDescription (RTCSessionDescription description);
Promise<void> setRemoteDescription (RTCSessionDescription description);
readonly attribute RTCSessionDescription? localDescription;
readonly attribute RTCSessionDescription? remoteDescription;
readonly attribute RTCSignalingState signalingState;
Promise<void> addIceCandidate (RTCIceCandidate candidate);
readonly attribute boolean? canTrickleIceCandidates;
readonly attribute RTCIceGatheringState iceGatheringState;
readonly attribute RTCIceConnectionState iceConnectionState;
[Pref="media.peerconnection.identity.enabled"]
readonly attribute Promise<RTCIdentityAssertion> peerIdentity;
[Pref="media.peerconnection.identity.enabled"]
readonly attribute DOMString? idpLoginUrl;
[ChromeOnly]
attribute DOMString id;
RTCConfiguration getConfiguration ();
[UnsafeInPrerendering]
sequence<MediaStream> getLocalStreams ();
[UnsafeInPrerendering]
sequence<MediaStream> getRemoteStreams ();
[UnsafeInPrerendering]
MediaStream? getStreamById (DOMString streamId);
void addStream (MediaStream stream);
void removeStream (MediaStream stream);
// replaces addStream; fails if already added
// because a track can be part of multiple streams, stream parameters
// indicate which particular streams should be referenced in signaling
RTCRtpSender addTrack(MediaStreamTrack track,
MediaStream stream,
MediaStream... moreStreams);
void removeTrack(RTCRtpSender sender);
sequence<RTCRtpSender> getSenders();
sequence<RTCRtpReceiver> getReceivers();
[ChromeOnly]
void mozSelectSsrc(RTCRtpReceiver receiver, unsigned short ssrcIndex);
void close ();
attribute EventHandler onnegotiationneeded;
attribute EventHandler onicecandidate;
attribute EventHandler onsignalingstatechange;
attribute EventHandler onaddstream; // obsolete
attribute EventHandler onaddtrack; // obsolete
attribute EventHandler ontrack; // replaces onaddtrack and onaddstream.
attribute EventHandler onremovestream;
attribute EventHandler oniceconnectionstatechange;
Promise<RTCStatsReport> getStats (optional MediaStreamTrack? selector);
// Data channel.
RTCDataChannel createDataChannel (DOMString label,
optional RTCDataChannelInit dataChannelDict);
attribute EventHandler ondatachannel;
};
// Legacy callback API
partial interface RTCPeerConnection {
// Dummy Promise<void> return values avoid "WebIDL.WebIDLError: error:
// We have overloads with both Promise and non-Promise return types"
Promise<void> createOffer (RTCSessionDescriptionCallback successCallback,
RTCPeerConnectionErrorCallback failureCallback,
optional RTCOfferOptions options);
Promise<void> createAnswer (RTCSessionDescriptionCallback successCallback,
RTCPeerConnectionErrorCallback failureCallback);
Promise<void> setLocalDescription (RTCSessionDescription description,
VoidFunction successCallback,
RTCPeerConnectionErrorCallback failureCallback);
Promise<void> setRemoteDescription (RTCSessionDescription description,
VoidFunction successCallback,
RTCPeerConnectionErrorCallback failureCallback);
Promise<void> addIceCandidate (RTCIceCandidate candidate,
VoidFunction successCallback,
RTCPeerConnectionErrorCallback failureCallback);
Promise<void> getStats (MediaStreamTrack? selector,
RTCStatsCallback successCallback,
RTCPeerConnectionErrorCallback failureCallback);
};