CARVIEW |
RTCStats Dictionary
An RTCStats
dictionary represents the stats gathered by
inspecting a specific object. The RTCStats
dictionary is a base
type that specifies as set of default attributes, such as timestamp
and type
. Specific stats are added by extending the
RTCStats
dictionary.
Note that while stats names are standardized, any given implementation may be using experimental values or values not yet known to the Web application. Thus, applications MUST be prepared to deal with unknown stats.
Statistics need to be synchronized with each other in order to yield reasonable
values in computation; for instance, if "bytesSent" and "packetsSent" are both
reported, they both need to be reported over the same interval, so that "average
packet size" can be computed as "bytes / packets" - if the intervals are different,
this will yield errors. Thus implementations MUST return synchronized values for
all stats in an RTCStats
dictionary.
dictionary RTCStats { DOMHighResTimeStamp timestamp; RTCStatsType type; DOMString id; };
Dictionary RTCStats Members
timestamp
of type DOMHighResTimeStamp-
The
timestamp
, of typeDOMHighResTimeStamp
[[!HIGHRES-TIME]], associated with this object. The time is relative to the UNIX epoch (Jan 1, 1970, UTC). The timestamp for local measurements corresponds to the local clock and for remote measurements corresponds to the timestamp indicated in the incoming RTCP Sender Report (SR), Receiver Report (RR) or Extended Report (XR). type
of type RTCStatsType-
The type of this object.
The
type
attribute MUST be initialized to the name of the most specific type thisRTCStats
dictionary represents. id
of type DOMString-
A unique
id
that is associated with the object that was inspected to produce thisRTCStats
object. TwoRTCStats
objects, extracted from two differentRTCStatsReport
objects, MUST have the sameid
if they were produced by inspecting the same underlying object. User agents are free to pick any format for theid
as long as it meets the requirements above.
RTCStatsType Enum
For ORTC, RTCStatsType
is equal to one of the
values defined in [[!WEBRTC-STATS]] Section 6.1:
"inbound-rtp"
-
Statistics for the inbound RTP stream. It is accessed via the
RTCInboundRTPStreamStats
defined in [[!WEBRTC-STATS]] Section 7.3. Local inbound RTP statistics can be obtained from theRTCRtpReceiver
object; remote inbound RTP statistics can be obtained from theRTCRtpSender
object. "outbound-rtp"
-
Statistics for the outbound RTP stream. It is accessed via the
RTCOutboundRTPStreamStats
defined in [[!WEBRTC-STATS]] Section 7.4. Local outbound RTP statistics can be obtained from theRTCRtpSender
object; remote outbound RTP statistics can be obtained from theRTCRtpReceiver
object. "data-channel"
-
Statistics relating to each
RTCDataChannel
id. It is accessed via theRTCDataChannelStats
defined in [[!WEBRTC-STATS]] Section 7.8. "track"
-
Statistics relating to the
MediaStreamTrack
object. It is accessed via theRTCMediaStreamTrackStats
defined in [[!WEBRTC-STATS]] Section 7.7. "transport"
-
Transport statistics related to the
RTCDtlsTransport
object. It is accessed via theRTCTransportStats
defined in [[!WEBRTC-STATS]] Sections 7.9. "candidate-pair"
-
ICE candidate pair statistics related to
RTCIceTransport
objects. It is accessed via theRTCIceCandidatePairStats
defined in [[!WEBRTC-STATS]] Section 7.11. "local-candidate"
-
ICE local candidate statistics, related to
RTCIceGatherer
objects. It is accessed via theRTCIceCandidateStats
for the local candidate, defined in [[!WEBRTC-STATS]] Section 7.10. "remote-candidate"
-
ICE remote candidate statistics, related to
RTCIceTransport
objects. It is accessed via theRTCIceCandidateStats
for the remote candidate, defined in [[!WEBRTC-STATS]] Section 7.10. "certificate"
-
Information about a certificate used by an
RTCDtlsTransport
object. It is accessed via theRTCCertificateStats
defined in [[!WEBRTC-STATS]] Sections 7.12.
Mandatory To Implement Stats
The stats listed in [[!WEBRTC-STATS]] are intended to cover a wide range of use cases. Not all of them have to be implemented by every ORTC implementation.
An ORTC implementation MUST support generating statistics of the types
described in [[!WEBRTC10]] Section 8.6, with the exception of
RTCPeerConnectionStats
, when the corresponding
objects exist, with the attributes that are listed when they are
valid for that object. An implementation MAY support generating any
other statistic defined in [[!WEBRTC-STATS]], and MAY generate
statistics that are not documented.
Example
Consider the case where the user is experiencing bad sound and the application wants to determine if the cause of it is packet loss. The following example code might be used:
var mySender = new RTCRtpSender(myTrack); var myPreviousReport = null; // ... wait a bit setTimeout(function() { mySender.getStats().then(function(report) { processStats(report); myPreviousReport = report; }); }, aBit); function processStats(currentReport) { if (myPreviousReport === null) return; // currentReport + myPreviousReport are an RTCStatsReport interface // compare the elements from the current report with the baseline for (var i in currentReport) { var now = currentReport[i]; if (now.type !== "outboundrtp") continue; // get the corresponding stats from the previous report base = myPreviousReport[now.id]; // base + now will be of RTCRtpStreamStats dictionary type if (base) { remoteNow = currentReport[now.associateStatsId]; remoteBase = myPreviousReport[base.associateStatsId]; var packetsSent = now.packetsSent - base.packetsSent; var packetsReceived = remoteNow.packetsReceived - remoteBase.packetsReceived; // if fractionLost is > 0.3, we have probably found the culprit var fractionLost = (packetsSent - packetsReceived) / packetsSent; } } }
Identity
The Identity API is marked as a feature at risk, since there is no clear commitment from implementers.
Overview
An RTCIdentity
instance enables authentication of an
RTCDtlsTransport
using a web-based Identity Provider (IdP).
The initiator acts as the Authenticating Party (AP) and obtains an
identity assertion from the IdP which is then conveyed in signaling.
The responder acts as the Relying Party (RP) and verifies the assertion.
The interaction with the IdP is designed to decouple the browser from any particular identity provider; the browser need only know how to load the IdP's JavaScript, the location of which is determined by the IdP's identity, and the generic interface to generating and validating assertions. The IdP provides whatever logic is necessary to bridge the generic protocol to the IdP's specific requirements. Thus, a single browser can support any number of identity protocols, including being forward compatible with IdPs which did not exist at the time the browser was written.
Operation
An RTCIdentity
instance is constructed from an
RTCDtlsTransport
object.
RTCIdentity Interface
The Identity API is described below.
[ Constructor (RTCDtlsTransport transport)] interface RTCIdentity { undefined setIdentityProvider (DOMString provider, optional RTCIdentityProviderOptions options); Promise<DOMString> getIdentityAssertion (); readonly attribute Promise<RTCIdentityAssertion> peerIdentity; readonly attribute RTCDtlsTransport transport; readonly attribute DOMString? idpLoginUrl; readonly attribute DOMString? idpErrorInfo; };
Constructors
RTCIdentity
-
Parameter Type Nullable Optional Description transport RTCDtlsTransport
✘ ✘
Attributes
peerIdentity
of type Promise<RTCIdentityAssertion>, readonly-
A promise that resolves with the identity of the peer if the identity is successfully validated.
This promise is rejected if an identity assertion is present in a remote session description and validation of that assertion fails for any reason. If the promise is rejected, a new unresolved value is created, unless a target peer identity has been established. If this promise successfully resolves, the value will not change.
transport
of type RTCDtlsTransport, readonly-
The
RTCDtlsTransport
to be authenticated. idpLoginUrl
of type DOMString, readonly, nullable-
The URL that an application can navigate to so that the user can login to the IdP, as described in .
idpErrorInfo
of type DOMString, readonly, nullable-
An attribute that the IdP can use to pass additional information back to the applications about the error. The format of this string is defined by the IdP and may be JSON.
Methods
setIdentityProvider
-
Sets the identity provider to be used for a given
RTCIdentity
object. Applications need not make this call; if the browser is already configured for an IdP, then that configured IdP might be used to get an assertion.When the
setIdentityProvider
method is invoked, the user agent MUST run the following steps:-
If the
RTCIdentity
object'stransport.state
attribute isclosed
, throw anInvalidStateError
. -
If options.protocol includes the the character
'/'
or'\'
, throw aSyntaxError
. -
Set the current identity provider values to the tuple (
provider
,options
). -
If any identity provider value has changed, discard any stored identity assertion.
Identity provider information is not used until an identity assertion is required in response to a call to
getIdentityAssertion
.Parameter Type Nullable Optional Description provider DOMString
✘ ✘ options RTCIdentityProviderOptions
✘ ✔ Return type:undefined
-
getIdentityAssertion
-
Initiates the process of obtaining an identity assertion. Applications need not make this call. It is merely intended to allow them to start the process of obtaining identity assertions before a call is initiated. If an identity is needed, either because the browser has been configured with a default identity provider or because the
setIdentityProvider
method was called, then an identity will be automatically requested when an offer or answer is created.When
getIdentityAssertion
is invoked, queue a task to run the following steps:-
If the
RTCIdentity
object'stransport.state
attribute isclosed
, throw anInvalidStateError
. -
Request an identity assertion from the IdP.
-
Resolve the promise with the base64 and JSON encoded assertion.
No parameters.Return type:Promise<DOMString>
-
Identity Provider Selection
An IdP is used to generate an identity assertion as follows:
- If the
setIdentityProvider()
method has been called, the IdP provided shall be used. - If the
setIdentityProvider()
method has not been called, then the user agent MAY use an IdP configured into the browser.
In order to verify assertions, the IdP domain name and protocol are
taken from the domain
and protocol
fields of
the identity assertion.
Instantiating an IdP Proxy
Instantiating an IdP proxy is described in [[WEBRTC-IDENTITY]] Section 4.2.
Implementing an IdP Securely
Aspects of IdP security are described in [[WEBRTC-IDENTITY]] Section 4.2.1.
Registering an IdP Proxy
Registration of an IdP proxy is described in [[WEBRTC-IDENTITY]] Section 5.
Interface Exposed by Identity Providers
The RTCIdentityProvider
callback functions
are called by RTCDtlsTransport
to acquire or validate identity assertions.
Requesting Identity Assertions
The identity assertion request process is triggered by a call to
getIdentityAssertion
. When this call is invoked and an
identity provider has been set, the following steps are executed:
-
The
RTCIdentity
instantiates an IdP as described in Identity Provider Selection and Registering an IdP Proxy. If the IdP cannot be loaded, instantiated, or the IdP proxy is not registered, this process fails. -
The
RTCIdentity
invokes thegenerateAssertion
method on theRTCIdentityProvider
methods registered by the IdP.The
RTCIdentity
generates the contents parameter to this method as described in [[!RTCWEB-SECURITY-ARCH]]. The value of contents includes the fingerprint of the certificate that was selected or generated during the construction of theRTCDtlsTransport
RTCIdentity.transport
. The origin parameter contains the origin of the script that triggers this behavior. The usernameHint value is the same value that is provided tosetIdentityProvider
, if any such value was provided. -
The IdP proxy returns a Promise to the
RTCIdentity
. The IdP proxy is expected to generate the identity assertion asynchronously.If the user has been authenticated by the IdP, and the IdP is able to generate an identity assertion, the IdP resolves the promise with an identity assertion in the form of an
RTCIdentityAssertionResult
.This step depends entirely on the IdP. The methods by which an IdP authenticates users or generates assertions is not specified, though they could involve interacting with the IdP server or other servers.
-
If the IdP proxy produces an error or returns a promise that does not resolve to a valid
RTCIdentityAssertionResult
(see ), then assertion generation fails. -
The
RTCIdentity
MAY store the identity assertion for future use. If a fresh identity assertion is needed for any reason, applications can create a newRTCIdentity
.
If assertion generation fails, then the promise for the corresponding
function call is rejected with a newly created OperationError
.
User Login Procedure
User login proceeds as described in [[WEBRTC-IDENTITY]] Section 6.1. IdP errors are handled as described in [[WEBRTC-IDENTITY]] Section 8.
Verifying Identity Assertions
Identity assertion validation happens when
RTCIdentity.transport.start()
is called. The process runs asynchronously,
meaning that validation of an identity assertion might not block the
transition of RTCIdentity.transport.state
to
connected
.
The identity assertion request process involves the following asynchronous steps:
-
The
RTCIdentity
awaits any prior identity validation. Only one identity validation can run at a time for anRTCIdentity
instance. -
The
RTCIdentity
loads the identity assertion from the session description and decodes the base64 value, then parses the resulting JSON. The idp parameter of the resulting dictionary contains a domain and an optional protocol value that identifies the IdP, as described in [[!RTCWEB-SECURITY-ARCH]]. -
If the identity assertion is malformed, or if protocol includes the character
'/'
or'\'
, this process fails. -
The
RTCIdentity
instantiates the identified IdP as described in and . If the IdP cannot be loaded, instantiated or the IdP proxy is not registered, this process fails. -
The
RTCIdentity
invokes thevalidateAssertion
method registered by the IdP.The assertion parameter is taken from the decoded identity assertion. The origin parameter contains the origin of the script that calls the
RTCIdentity
method that triggers this behavior. -
The IdP proxy returns a promise and performs the validation process asynchronously.
The IdP proxy verifies the identity assertion using whatever means necessary. Depending on the authentication protocol this could involve interacting with the IdP server.
-
If the IdP proxy produces an error or returns a promise that does not resolve to a valid
RTCIdentityValidationResult
(see ), then identity validation fails. -
Once the assertion is successfully verified, the IdP proxy resolves the promise with an
RTCIdentityValidationResult
containing the validated identity and the original contents that are the payload of the assertion. -
The
RTCIdentity
decodes thecontents
attribute ofRTCIdentityValidationResult
and validates that it contains a fingerprint value for the remote certificate. This ensures that the certificate used by the remote peer for communications is covered by the identity assertion.A user agent is required to fail to communicate with peers that offer a certificate that doesn't match.
The user agent decodes
contents
using the format described in [[!RTCWEB-SECURITY-ARCH]]. However the IdP MUST treatcontents
as opaque and return the same string to allow for future extensions. -
The
RTCIdentity
validates that the domain portion of the identity matches the domain of the IdP as described in [[!RTCWEB-SECURITY-ARCH]]. If this check fails then the identity validation fails. -
The
RTCIdentity
resolves thepeerIdentity
attribute with a new instance ofRTCIdentityAssertion
that includes the IdP domain and peer identity. -
The user agent MAY display identity information to a user in its UI. Any user identity information that is displayed in this fashion MUST use a mechanism that cannot be spoofed by content.
If identity validation fails, the
peerIdentity
promise is rejected with a
newly created
OperationError
.
If identity validation fails and there is a target peer
identity for the RTCDtlsTransport
, the promise returned
MUST be rejected with the same
DOMException
.
If identity validation fails and there is no a target peer
identity, the value of the
peerIdentity
MUST be set to a new,
unresolved promise instance. This permits the use of renegotiation (or a
subsequent answer, if the session description was a provisional answer)
to resolve or reject the identity.
Example
The identity system is designed so that applications need not take any special action in order for users to generate and verify identity assertions; if a user has configured an IdP into their browser, then the browser will automatically request/generate assertions and the other side will automatically verify them and display the results. However, applications may wish to exercise tighter control over the identity system as shown by the following examples.
This example shows how to configure the identity provider and protocol, and consume identity assertions.
// Set ICE gather options and construct the RTCIceGatherer object, assuming that // we are using RTP/RTCP mux and A/V mux so that only one RTCIceTransport is needed. // Include some helper functions import {trace, errorHandler, mySendLocalCandidate, myIceGathererStateChange, myIceTransportStateChange, myDtlsTransportStateChange} from 'helper'; var gatherOptions = { gatherPolicy: "all", iceServers: [ { urls: "stun:stun1.example.net" }, { urls: "turn:turn.example.org", username: "user", credential: "myPassword", credentialType: "password" } ] }; var iceGatherer = new RTCIceGatherer(gatherOptions); iceGatherer.onlocalcandidate = function(event) { mySendLocalCandidate(event.candidate); }; // Start gathering iceGatherer.gather(); // Construct the ICE transport var ice = new RTCIceTransport(iceGatherer); // Create the DTLS certificate var certs; var keygenAlgorithm = { name: "ECDSA", namedCurve: "P-256" }; RTCCertificate.generateCertificate(keygenAlgorithm).then(function(certificate){ certs[0] = certificate; }, function(){ trace('Certificate could not be created'); }); // Create the RTCDtlsTransport object. var dtls = new RTCDtlsTransport(ice, certs); var identity = new RTCIdentity(dtls); identity .getIdentityAssertion("example.com", "default", "alice@example.com") .then(signalAssertion(assertion), function(e) { trace("Could not obtain an Identity Assertion. idp: " + e.idp + " Protocol: " + e.protocol + " loginUrl: " + e.loginUrl); }); function signalAssertion(assertion) { mySignalInitiate({ myAssertion: assertion, ice: iceGatherer.getLocalParameters(), dtls: dtls.getLocalParameters() }, function(response) { ice.start(iceGatherer, response.ice, RTCIceRole.controlling); // Call dtls.start() before setIdentityAssertion so the peer assertion can be validated. dtls.start(response.dtls); identity.setIdentityAssertion(response.myAssertion).then(function(peerAssertion) { trace("Peer identity assertion validated. idp: " + peerAssertion.idp + " name: " + peerAssertion.name); }, function(e) { trace("Could not validate peer assertion. idp: " + e.idp + " Protocol: " + e.protocol); }); }); }
Certificate Management
Overview
The RTCCertificate
interface represents a
certificate used to authenticate communications. In addition to
the visible properties, internal slots contain a handle to the
generated private keying materal ([[\KeyingMaterial]]) and a certificate
([[\Certificate]]]]).
Certificates are provided in the constructors of
RTCDtlsTransport
and RTCQuicTransport
objects, and are used to authenticate to a peer. This makes it possible
to support forking, where the offerer creates multiple RTCDtlsTransport
or RTCQuicTransport
objects using the same local certificate and
fingerprint. Also, an RTCCertificate
can be persisted in
[[INDEXEDDB]] and reused, so as to avoid the cost of key generation.
RTCCertificateExpiration Dictionary
RTCCertificateExpiration
is used to set an
expiration date on certificates generated by
generateCertificate
.
dictionary RTCCertificateExpiration { [EnforceRange] DOMTimeStamp expires; };
- expires
-
An optional
expires
attribute MAY be added to the definition of the algorithm that is passed togenerateCertificate
. If this parameter is present it indicates the maximum time that theRTCCertificate
is valid for relative to the current time.When
generateCertificate
is called with anobject
argument, the user agent attempts to convert the object into anRTCCertificateExpiration
. If this is unsuccessful, immediately return a promise that is rejected with a newly createdTypeError
and abort processing.A user agent generates a certificate that has an expiration date set to the current time plus the value of the
expires
attribute. Theexpires
attribute of the returnedRTCCertificate
is set to the expiration time of the certificate. A user agent MAY choose to limit the value of theexpires
attribute.
RTCCertificate Interface
The RTCCertificate
interface is described below.
[Exposed=Window] interface RTCCertificate { readonly attribute DOMTimeStamp expires; static sequence<AlgorithmIdentifier> getSupportedAlgorithms(); sequence<RTCDtlsFingerprint> getFingerprints (); static Promise<RTCCertificate> generateCertificate (AlgorithmIdentifier keygenAlgorithm); };
Attributes
expires
of type DOMTimeStamp, readonly-
The
expires
attribute indicates the date and time in milliseconds relative to 1970-01-01T00:00:00Z after which the certificate will be considered invalid by the browser. After this time, attempts to construct an object using this certificate will fail.Note that this value might not be reflected in a
notAfter
parameter in the certificate itself.
Methods
getSupportedAlgorithms
-
Returns a sequence providing a representative set of supported certificate algorithms. At least one algorithm MUST be returned.
For example, the "RSASSA-PKCS1-v1_5" algorithm dictionary,
RsaHashedKeyGenParams
, contains fields for the modulus length, public exponent, and hash algorithm. Implementations are likely to support a wide range of modulus lengths and exponents, but a finite number of hash algorithms. So in this case, it would be reasonable for the implementation to return oneAlgorithmIdentifier
for each supported hash algorithm that can be used with RSA, using default/recommended values formodulusLength
andpublicExponent
(such as 1024 and 65537, respectively).No parameters.Return type: sequence<AlgorithmIdentifier
> getFingerprints
-
Returns the list of certificate fingerprints, one of which is computed with the digest algorithm used in the certificate signature.
No parameters.Return type: sequence<RTCDtlsFingerprint
> generateCertificate
, static-
The
generateCertificate
method causes the user agent to create and store an X.509 certificate [[!X509V3]] and corresponding private key. A handle to information is provided in the form of theRTCCertificate
interface. The returnedRTCCertificate
can be used to control the certificates that are offered in DTLS or QUIC.The
keygenAlgorithm
argument is used to control how the private key associated with the certificate is generated. ThekeygenAlgorithm
argument uses the WebCrypto [[!WebCryptoAPI]] AlgorithmIdentifier type. ThekeygenAlgorithm
value MUST be a valid argument towindow.crypto.subtle.generateKey
; that is, the value MUST produce a non-error result when normalized according to the WebCrypto algorithm normalization process [[!WebCryptoAPI]] with an operation name ofgenerateKey
and a [[supportedAlgorithms]] value specific to production of certificates forRTCDtlsTransport
. If the algorithm normalization process produces an error, the call togenerateCertificate()
MUST be rejected with that error.Signatures produced by the generated key are used to authenticate the DTLS or QUIC connection. The identified algorithm (as identified by the
name
of the normalizedAlgorithmIdentifier
) MUST be an asymmetric algorithm that can be used to produce a signature.The certificate produced by this process also contains a signature. The validity of this signature is only relevant for compatibility reasons. Only the public key and the resulting certificate fingerprint are used by
RTCDtlsTransport
orRTCQuicTransport
, but it is more likely that a certificate will be accepted if the certificate is well formed. The browser selects the algorithm used to sign the certificate; a browser SHOULD select SHA-256 [[!FIPS-180-4]] if a hash algorithm is needed.The resulting certificate MUST NOT include information that can be linked to a user or user agent. Randomized values for distinguished name and serial number SHOULD be used.
An optional
expires
attribute MAY be added to the keygenAlgorithm parameter. If this contains aDOMTimeStamp
value, it indicates the maximum time that theRTCCertificate
is valid for relative to the current time. A user agent sets theexpires
attribute of the returnedRTCCertificate
to the current time plus the value of theexpires
attribute. However, a user agent MAY choose to limit the period over which anRTCCertificate
is valid.A user agent MUST reject a call to
generateCertificate()
with aDOMError
of type "NotSupportedError" if the keygenAlgorithm parameter identifies an algorithm that the user agent cannot or will not use to generate a certificate forRTCDtlsTransport
.The following values MUST be supported by a user agent:
{ name: "RSASSA-PKCS1-v1_5", modulusLength: 2048, publicExponent: new Uint8Array([1, 0, 1]), hash: "SHA-256" }
, and{ name: "ECDSA", namedCurve: "P-256" }
.It is expected that a user agent will have a small or even fixed set of values that it will accept.
Parameter Type Nullable Optional Description keygenAlgorithm AlgorithmIdentifier
✘ ✘ Return type:Promise
<RTCCertificate
>
For the purposes of this API, the [[\Certificate]] slot
contains unstructured binary data. No mechanism is provided for
applications to access the [[\KeyingMaterial]] internal slot.
Implementations MUST support applications storing and retrieving
RTCCertificate
objects from persistent storage.
In implementations where an RTCCertificate
might not
directly hold private keying material (it might be stored in a
secure module), a reference to the private key can be held in
the [[\KeyingMaterial]] internal slot, allowing the
private key to be stored and used.
When a user agent is required to obtain a structured
clone [[!HTML51]] of an RTCCertificate
object,
it performs the following steps:
- Let input and memory be the corresponding
inputs defined by the internal structured cloning algorithm, where
input represents an
RTCCertificate
object to be cloned. - Let output be a newly constructed
RTCCertificate
object. - Copy the value of the
expires
attribute from input to output. - Let the [[\Certificate]] internal slot of output be set to the result of invoking the internal structured clone algorithm recursively on the corresponding internal slots of input, with the slot contents as the new "input" argument and memory as the new "memory" argument.
- Let the [[\KeyingMaterial]] internal slot of output refer to the same private keying material represented by the [[\KeyingMaterial]] internal slot of input.
Privacy and Security Considerations
This section is non-normative; it specifies no new behaviour, but instead summarizes information already present in other parts of the specification. The overall security considerations of the APIs and protocols used in ORTC are described in [[RTCWEB-SECURITY-ARCH]].
Impact on same origin policy
The ORTC API enables real-time communication between browsers and other devices, including other browsers.
This means that data and media can be shared between applications running in different browsers, or between an application running in the same browser and something that is not a browser. This is an extension to the Web model which has had barriers against sending data between entities with different origins.
The ORTC specification provides no user prompts or chrome indicators for communication; it assumes that once the Web page has been allowed to access media, it is free to share that media with other entities as it chooses. Peer-to-peer exchanges of data via datachannels can therefore occur without any user explicit consent or involvement. Similarly, a server-mediated exchange (e.g. via Web Sockets) could occur without user involvement.
The peerIdentity
mechanism loads and executes
JavaScript code from a third-party server acting as an identity provider.
That code is executed in a separate JavaScript realm and does not affect
the protections afforded by the same origin policy.
Revealing IP addresses
Even without ORTC, the Web server providing a Web application will know the public IP address to which the application is delivered. Setting up communications exposes additional information about the browser’s network context to the web application, and may include the set of (possibly private) IP addresses available to the browser for WebRTC use. Some of this information has to be passed to the corresponding party to enable the establishment of a communication session.
Revealing IP addresses can leak location and means of connection; this can be sensitive. Depending on the network environment, it can also increase the fingerprinting surface and create persistent cross-origin state that cannot easily be cleared by the user.
A connection will always reveal the IP addresses proposed for
communication to the corresponding party. The application can limit this
exposure by choosing not to use certain addresses using the settings
exposed by the RTCIceGatherPolicy
dictionary, and by using
relays (for instance TURN servers) rather than direct connections between
participants. One will normally assume that the IP address of TURN
servers is not sensitive information. These choices can for instance be
made by the application based on whether the user has indicated consent
to start a media connection with the other party.
Mitigating the exposure of IP addresses to the application itself requires limiting the IP addresses that can be used, which will impact the ability to communicate on the most direct path between endpoints. Browsers are encouraged to provide appropriate controls for deciding which IP addresses are made available to applications, based on the security posture desired by the user. The choice of which addresses to expose is controlled by local policy (see [[RTCWEB-IP-HANDLING]] for details).
Impact on local network
Since the browser is an active platform executing in a trusted network environment (inside the firewall), it is important to limit the damage that the browser can do to other elements on the local network, and it is important to protect data from interception, manipulation and modification by untrusted participants.
Mitigations include:
- An UA will always request permission from the correspondent UA to communicate using ICE. This ensures that the UA can only send to partners who you have shared credentials with.
- An UA will always request ongoing permission to continue sending using ICE consent [[!RFC7675]]. This enables a receiver to withdraw consent to receive.
- An UA will always encrypt data, with strong per-session keying (DTLS-SRTP).
- An UA will always use congestion control. This ensures that ORTC cannot be used to flood the network.
These measures are specified in the relevant IETF documents.
Confidentiality of Communications
The fact that communication is taking place cannot be hidden from adversaries that can observe the network, so this has to be regarded as public information.
A mechanism, peerIdentity
, is provided that gives
Javascript the option of requesting media that the same javascript cannot
access, but can only be sent to certain other entities.
Persistent information
As described above, the list of IP addresses exposed by the ORTC API can be used as a persistent cross-origin state.
Beyond IP addresses, the ORTC API exposes information about the
underlying media system via the RTCRtpSender.getCapabilities
and RTCRtpReceiver.getCapabilities
methods, including
detailed and ordered information about the codecs that the system is able
to produce and consume.
That information is in most cases persistent across time
and origins, and increases the fingerprint surface of a given device.
When establishing DTLS connections, the ORTC API can generate certificates that can be persisted by the application (e.g. in IndexedDB). These certificates are not shared across origins, and get cleared when persistent storage is cleared for the origin.
Event summary
The following events fire on RTCIceGatherer
objects:
Event name | Interface | Fired when... |
---|---|---|
icecandidateerror |
RTCIceGathererIceErrorEvent |
The RTCIceGatherer object has experienced an ICE
gathering failure (such as an authentication failure with TURN
credentials). |
statechange |
Event |
The RTCIceGathererState changed. |
icecandidate |
RTCIceGatherer |
A new RTCIceGatherCandidate is made available to the
script. |
The following events fire on RTCIceTransport
objects:
Event name | Interface | Fired when... |
---|---|---|
statechange |
Event |
The RTCIceTransportState changed. |
icecandidatepairchange |
RTCIceCandidatePairChangedEvent |
The selected RTCIceCandidatePair changed. |
The following events fire on RTCDtlsTransport
objects:
Event name | Interface | Fired when... |
---|---|---|
error |
ErrorEvent |
The RTCDtlsTransport object has received a DTLS
Alert. |
statechange |
Event |
The RTCDtlsTransportState changed. |
The following events fire on RTCRtpSender
objects:
Event name | Interface | Fired when... |
---|---|---|
ssrcconflict |
RTCSsrcConflictEvent |
An SSRC conflict has been detected within the RTP session. |
The following events fire on RTCRtpListener
objects:
Event name | Interface | Fired when... |
---|---|---|
unhandledrtp |
RTCRtpUnhandledEvent |
The RTCRtpListener object has received an RTP packet
that it cannot deliver to an RTCRtpReceiver object. |
The following events fire on RTCDTMFSender
and RTCDtmfSender
objects:
Event name | Interface | Fired when... |
---|---|---|
tonechange |
Event |
The RTCDtmfSender object has either just begun playout
of a tone (returned as the tone attribute) or just ended playout
of a tone (returned as an empty value in the tone attribute). |
The following events fire on RTCDataChannel
objects:
Event name | Interface | Fired when... |
---|---|---|
open |
Event |
The RTCDataChannel object's underlying data
transport has been established (or re-established).
|
message |
MessageEvent
[[!webmessaging]] |
A message was successfully received. |
bufferedamountlow |
Event |
The RTCDataChannel object's bufferedAmount decreases from
above its bufferedAmountLowThreshold
to less than or equal to its bufferedAmountLowThreshold . |
error |
ErrorEvent |
An error has been detected within the RTCDataChannel
object. This is not used for programmatic exceptions. |
close |
Event |
The RTCDataChannel object's underlying data
transport has been closed.
|
The following events fire on RTCSctpTransport
objects:
Event name | Interface | Fired when... |
---|---|---|
datachannel |
RTCDataChannelEvent |
A new RTCDataChannel is dispatched to the script in
response to the other peer creating a channel. |
statechange |
Event |
The RTCSctpTransportState changed. |
WebRTC 1.0 Compatibility
It is a goal of the ORTC API to provide the functionality of the WebRTC 1.0 API [[!WEBRTC10]], as well as to enable the WebRTC 1.0 API to be implemented on top of the ORTC API, utilizing a Javascript "shim" library. This section discusses WebRTC 1.0 compatibility issues that have been encountered by ORTC API implementers.
replaceTrack/setTrack
WebRTC 1.0 supports the replaceTrack
method,
whereas ORTC originally supported the setTrack
method.
In order to provide backward compatibility, this specification has
added replaceTrack
as an alias for setTrack
.
RTCDTMFSender/RTCDtmfSender
WebRTC 1.0 supports the RTCDTMFSender
interface,
whereas ORTC originally supported the RTCDtmfSender
interface. In order to provide backward compatibility, this specification
has added support for the RTCDTMFSender
interface.
In WebRTC 1.0 the RTCDTMFSender
is an extension of
RTCRtpSender
whereas in ORTC it is created with an
RTCRtpSender
. The WebRTC 1.0 behaviour can be emulated by
providing a getter for RTCRtpSender
.dtmf attribute.
BUNDLE
Via the use of [[!BUNDLE]] it is possible for WebRTC 1.0 implementations to
multiplex audio and video on the same RTP session. Within ORTC API, equivalent
behavior can be obtained by constructing multiple
RTCRtpReceiver
and RTCRtpSender
objects
from the same RTCDtlsTransport
object. As noted in
[[!RTP-USAGE]] Section 4.4, support for audio/video multiplexing is required, as
described in [[!RTP-MULTI-STREAM]].
Voice Activity Detection
[[!WEBRTC10]] Section 4.2.4 defines the RTCOfferOptions
dictionary,
which includes the voiceActivityDetection
attribute, which determines
whether Voice Activity Detection (VAD) is enabled within the Offer produced by
createOffer()
. The effect of setting
voiceActivityDetection
to true
is to include the Comfort
Noice (CN) codec defined in [[!RFC3389]] within the Offer.
Within ORTC API, equivalent behavior can be obtained by configuring the Comfort
Noise (CN) codec for use within RTCRtpParameters
, and/or configuring a
codec with built-in support for Discontinuous Operation (DTX), such as Opus. As
noted in [[!RFC7874]] Section 3, support for CN is required.
H.264/AVC
[[RFC6184]] Section 8.1 defines the level-asymmetry-allowed
SDP
parameter supported by some WebRTC 1.0 API implementations. Within ORTC API, the
profile-level-id
capability is supported for both the
RTCRtpSender
and RTCRtpReceiver
, and the
profile-level-id
setting is provided for the
RTCRtpSender
. Since in ORTC API sender and receiver
profile-level-id
capabilities are independent and there is no
profile-level-id
setting for an RTCRtpReceiver
, ORTC
API assumes that implementations support level asymmetry. Therefore a WebRTC 1.0
API shim library for ORTC API should provide a level-asymmetry-allowed
value of 1
.
Identity and non-multiplexed RTP/RTCP
Where RTP and RTCP are not multiplexed, distinct
RTCIceTransport
, RTCDtlsTransport
and
RTCIdentity
objects can be constructed for RTP and RTCP. While
it is possible for getIdentityAssertion
() to be called with different
values of provider
, protocol
and username
for the RTP and RTCP RTCIdentity
objects, application
developers desiring backward compatibility with WebRTC 1.0 are strongly discouraged
from doing so, since this is likely to result in an error.
Also, where RTP and RTCP are not multiplexed, it is possible that the assertions for both the RTP and RTCP will be validated, but that the identities will not be equivalent. Applications requiring backward compatibility with WebRTC 1.0 are advised to consider this an error. However, if backward compatibility with WebRTC 1.0 is not required the application can consider an alternative, such as ignoring the RTCP identity assertion.
Examples
Simple Peer-to-peer Example
This example code provides a basic audio and video session between two browsers.
QUIC Examples
This example shows how an RTCQuicTransport
can be established
between browsers.
// Include some helper functions import {trace, errorHandler, mySendLocalCandidate, myIceGathererStateChange, myIceTransportStateChange, myDtlsTransportStateChange} from 'helper'; function initiate(mySignaller) { // Prepare the IceGatherer var gatherOptions = { gatherPolicy: "all", iceServers: [ { urls: "stun:stun1.example.net" }, { urls: "turn:turn.example.org", username: "user", credential: "myPassword", credentialType: "password" } ] }; var iceGatherer = new RTCIceGatherer(gatherOptions); // Handle state changes iceGatherer.onstatechange = function(event) { myIceGathererStateChange("iceGatherer", event.state); }; // Handle errors iceGatherer.onerror = errorHandler; // Prepare to signal local candidates iceGatherer.onlocalcandidate = function(event) { mySignaller.mySendLocalCandidate(event.candidate); }; // Start gathering iceGatherer.gather(); // Create the IceTransport var ice = new RTCIceTransport(iceGatherer); // Prepare to handle remote ICE candidates mySignaller.onRemoteCandidate = function(remote) { ice.addRemoteCandidate(remote.candidate); }; // Create the certificate var certs; var keygenAlgorithm = { name: "ECDSA", namedCurve: "P-256" }; RTCCertificate.generateCertificate(keygenAlgorithm).then(function(certificate){ certs[0] = certificate; }, function(){ trace('Certificate could not be created'); }); // Create the DtlsTransport and QuicTransport var dlts = new RTCDtlsTransport(ice, certs); var quic = new RTCQuicTransport(ice, certs); mySignaller.sendInitiate({ ice: iceGatherer.getLocalParameters(), dlts: dtls.getLocalParameters(), quic: quic.getLocalParameters(), // ... marshall RtpSender/RtpReceiver capabilities as in Section 6.6 Examples 8 and 9. }, function(remote) { // Start the IceTransport, DtlsTransport and QuicTransport ice.start(iceGatherer, remote.ice, RTCIceRole.controlling); dtls.start(remote.dtls); quic.start(remote.quic); // ... configure RtpSender/RtpReceiver objects as in Section 6.6 Examples 8 and 9. }); }
// This is an example of how to answer // Include some helper functions import {trace, errorHandler, mySendLocalCandidate, myIceGathererStateChange, myIceTransportStateChange, myDtlsTransportStateChange} from 'helper'; function accept(mySignaller, remote) { var gatherOptions = { gatherPolicy: "all", iceServers: [ { urls: "stun:stun1.example.net" }, { urls: "turn:turn.example.org", username: "user", credential: "myPassword", credentialType: "password" } ] }; var iceGatherer = new RTCIceGatherer(gatherOptions); // Handle state changes iceGatherer.onstatechange = function(event) { myIceGathererStateChange("iceGatherer", event.state); }; // Handle errors iceGatherer.onerror = errorHandler; // Prepare to signal local candidates iceGatherer.onlocalcandidate = function(event) { mySignaller.mySendLocalCandidate(event.candidate); }; // Start gathering iceGatherer.gather(); // Create the IceTransport var ice = new RTCIceTransport(iceGatherer); // Prepare to handle remote ICE candidates mySignaller.onRemoteCandidate = function(remote) { ice.addRemoteCandidate(remote.candidate); }; // Create the certificate var certs; var keygenAlgorithm = { name: "ECDSA", namedCurve: "P-256" }; RTCCertificate.generateCertificate(keygenAlgorithm).then(function(certificate){ certs[0] = certificate; }, function(){ trace('Certificate could not be created'); }); // Create the DtlsTransport and QuicTransport var dtls = new RTCDtlsTransport(ice, certs); var quic = new RTCQuicTransport(ice, certs); mySignaller.sendAccept({ ice: iceGatherer.getLocalParameters(), dtls: dtls.getLocalParameters(), quic: quic.getLocalParameters(), // ... marshall RtpSender/RtpReceiver capabilities as in Section 6.6 Examples 8 and 9. }); // Start the IceTransport and DtlsTransport ice.start(iceGatherer, remote.ice, RTCIceRole.controlled); dtls.start(remote.dtls); // Start the QuicTransport quic.start(remote.quic); // ... configure RtpSender/RtpReceiver objects as in Section 6.6 Examples 8 and 9. }
Determining common capabilities
Several of the examples reference myCapsToSendParams, which
returns sender parameters based on the intersection of the capabilities of
the RTCRtpSender
and RTCRtpReceiver
.
This section provides an example of what such a library
function might do.
RTCRtpCapabilities function getCommonCapabilities(RTCRtpCapabilities localCapabilities, RTCRtpCapabilities remoteCapabilities) { // Function returning the common capabilities, based on the local sender and // remote receiver capabilities. An implementation is available here: // https://webrtc.github.io/adapter/adapter-latest.js // // Steps to determine the common capabilities of the local sender and // remote receiver: // 1. Determine the common codecs. // 2. For each common codec, determine the common headerExtensions and // rtcpFeedback mechanisms. // 3. For each common audio codec, determine: // a. For channels, the minimum of the local and remote values. // b. For maxptime, the minimum of the local and remote maxptime. // c. For ptime, the remote ptime if it is less than the computed maxptime // in step b); otherwise choose the local ptime. // 4. For each common codec, determine the common parameters, such as: // a. For H.264/AVC, the minimum of the local and remote // profile-level-id (the packetization-mode must match for it // to be considered a common codec). // b. For Opus, usedtx and useinbandfec set to one if both sides // support that, otherwise zero. // 5. Determine the common robustness (forward error correction and // retransmission) mechanisms. // 6. Determine the payloadType to be used, based on the remote // preferredPayloadType. } RTCRtpSendParameters function myCapsToSendParams(RTCRtpCapabilities sendCaps, RTCRtpCapabilities remoteRecvCaps) { // Find the common capabilities var commonCaps = getCommonCapabilities(sendCaps, remoteRecvCaps); // Use the common capabilities to build the RTCRtpSendParameters // 1. Populate the codecs list // 2. Populate the headerExtensions // 3. Set RTCRtcpParameters to their default values. // 4. Return RTCRtpSendParameters enabling the jointly supported features // and codecs. var sendParams = {}; // Populate the codecs list and header extensions sendParams.codecs = commonCaps.codecs; sendParams.headerExtensions = commonCaps.headerExtensions; sendParams.rtcp = {reducedSize: false, mux: true}; // Do not set any encodings sendParams.encodings = {}; // Set degradationPreference to its default value sendParams.degradationPreference = "balanced"; return sendParams; } RTCRtpReceiveParameters function myCapsToRecvParams(RTCRtpCapabilities recvCaps, RTCRtpCapabilities remoteSendCaps) { // Find the common capabilities var commonCaps = getCommonCapabilities(remoteSendCaps, recvCaps); // Use the common capabilities to build the RTCRtpReceiveParameters // 1. Populate the codecs list // 2. Populate the headerExtensions // 3 Set RTCRtcpParameters to their default values. // 4. Return RTCRtpReceiveParameters enabling the jointly supported features // and codecs. var receiveParams = {}; // Populate the codecs list and headerExtensions receiveParams.codecs = commonCaps.codecs; receiveParams.headerExtensions = commonCaps.headerExtensions; receiveParams.rtcp = {reducedSize: false, mux: true}; // Do not set any encodings receiveParams.encodings = {}; return receiveParams; }
Acknowledgements
The editor wishes to thank Erik Lagerway (former Chair of the ORTC CG and Co-chair of the WEBRTC WG) for his support. Substantial text in this specification was provided by many people including Peter Thatcher, Martin Thomson, Iñaki Baz Castillo, Jose Luis Millan, Christoph Dorn, Roman Shpount, Emil Ivov, Shijun Sun and Jason Ausborn. Special thanks to Peter Thatcher for his design contributions relating to many of the objects in the current specification, and to Philipp Hancke, Lennart Grahl, Jxck and Iñaki Baz Castillo for their detailed review.
Change Log
This section will be removed before publication.
Changes since 01 February 2018
- Update finding common capabilities example, as noted in: Issue 569
- Add checks for header extension conflicts, as noted in: Issue 803
- Update
RTCIdentity
(now in Section 14) to reference [[WEBRTC-IDENTITY]], as noted in: Issue 813 - Update the
RTCDataChannel
interface to match WebRTC 1.0, as noted in: Issue 817 - Update the
RTCSctpTransport
interface to match WebRTC 1.0, as noted in: Issue 820 - Clarify the operation of the
RTCCertificate
keying material internal slot, as noted in: Issue 832 - Update mandatory-to-implement statistics, as noted in: Issue 833
- Separate
RTCRtpSendParameters
andRTCRtpReceiveParameters
, as noted in: Issue 835 - Remove Section 13 (
RTCQuicTransport
) and Section 14 (RTCQuicStream
), and reference [[WEBRTC-QUIC]], as noted in: Issue 853 - Update RID usage in examples, as noted in: Issue 865
Changes since 22 September 2017
- Add error checks in
send
, as noted in: Issue 473 - Support
priority
inRTCDataChannel
, as noted in: Issue 623 - Fix issues with
maxMessageSize
inRTCSctpCapabilities
, as noted in: Issue 626 - Clarify handling of unsupported fingerprint algorithms, as noted in: Issue 752
- Add [Exposed] to interfaces, as noted in: Issue 766
- Clarify operation of the
RTCRtpSender
andRTCRtpReceiver
constructor, as noted in: Issue 778 - Clarify definition of
RTCQuicStreamState
, as noted in: Issue 788 - Reference WebRTC 1.0 for definitions of
RTCIceCredentialType
andRTCOauthCredential
, as noted in: Issue 792 - Allow construction of an
RTCRtpReceiver
object without a transport, as noted in: Issue 801 - Clarify
track.muted
default inRTCRtpReceiver
constructor, as noted in: Issue 807 - Allow null transport argument to
setTransport
, as noted in: Issue 808 - Update the
RTCRtpContributingSource
andRTCRtpSynchronizationSource
dictionaries to match WebRTC 1.0, as noted in: Issue 809 - Update the
RTCCertificate
interface to match WebRTC 1.0, as noted in: Issue 812
Changes since 01 May 2017
- Add checks in the
send
method, as noted in: Issue 564 - Add support for reliable QUIC data exchange, as noted in: Issue 584
- Add a compliance section, as noted in: Issue 586
- Change type of
maxFramerate
to double, as noted in: Issue 687 - Change codec parameter names from camelCase to SDP-style names, as noted in: Issue 689
- Clarify operation of
RTCDtlsTransport.getLocalParameters
, as noted in: Issue 690 - Reference WebIDL definition of ArrayBuffer, as noted in: Issue 692
- Define
getCertificates()
method and removecertificates
attribute, as noted in: Issue 696 - Clarify sender settings for "flexfec", as noted in: Issue 698
- Add a Privacy and Security section, as noted in: Issue 705
- Mark
getAlgorithm
as a "feature at risk", as noted in: Issue 707 - Mark the QoS/Priority API as a "feature at risk", as noted in: Issue 708
- Add validation steps in the
RTCDataChannel
constructor, as noted in: Issue 717 - Update contributing and synchronization sources for compatibility with WebRTC 1.0, as noted in: Issue 718
- Update DTMF support for compatibility with WebRTC 1.0, as noted in: Issue 719
- Synchronize with WebRTC 1.0 changes to ICE, as noted in: Issue 720
- Clarify key shortening behavior with use of OAuth credentials, as noted in: Issue 721
- Enable
setTrack
/replaceTrack
argument to benull
, as noted in: Issue 722 - Update with WebRTC 1.0 changes to
RTCRtpParameters
, as noted in: Issue 723 - Add support for DTLS error reporting, as noted in: Issue 724
- Fix race conditions in the DTMF examples, as noted in: Issue 732
- Change
numChannels
tochannels
, as noted in: Issue 738 - Clarify behavior of
getCapabilities
, as noted in: Issue 740 - Remove the
nohost
gathering policy, as noted in: Issue 742 - Add support for the
getDefaultIceServers
method, as noted in: Issue 743 - Update
RTCStatsType
values based on WebRTC 1.0, as noted in: Issue 745 - Add validation steps in the
RTCIceGatherer
constructor, as noted in: Issue 748
Changes since 02 December 2016
- Updated the RTP matching rules (Section 6.5) to address issues Issue 368 and Issue 547.
- Clarified handling of H.264 packetizationMode in
RTCRtpCodecCapability
, as noted in: Issue 567 - Provided updated guidance on use of multiple encodings as noted in: Issue 568
- Added support for
replaceTrack
, as noted in: Issue 614 - Updated Oauth token auth support, as noted in: Issue 618
- Enabled setting of the
RTCSctpTransport
remote port, as noted in: Issue 625 - Changed the
maxMessageSize
attribute type to unsigned long, as noted in: Issue 626 - Clarified handling of RTX in
RTCRtpCapabilities.codecs
, as noted in: Issue 627 - Clarified
RTCSctpTransportState
definitions, as noted in: Issue 635 - Changed
RTCIceComponent
values to lower case, as noted in: Issue 636 - Described the firing of the
mute
andunmute
events, as noted in: Issue 639 - Added optional H.264 codec settings, as noted in: Issue 641
- Updated Section 6.5.3 to refer to RTCP packet routing specification, as noted in: Issue 643
- Updated Examples 21 and 22 to reflect updated
RTCSctpTransport
API, as noted in: Issue 648 - Provided details on the operation of
RTCIceTransport.stop
, as noted in: Issue 651 - Clarified the purpose of
RTCRtpCodecCapabilities.fecMechanisms
, as noted in: Issue 655 - Allowed an
RTCRtpSender
to be constructed with aMediaStreamTrack
orkind
, as noted in: Issue 656 - Clarified when multiple
RTCRtpCodecCapability
entries are provided for the same codec, as noted in: Issue 662 - Marked Identity as a "feature at risk", as noted in: Issue 668
- Updated Statistics API to track changes to WebRTC Statistics specification, as noted in: Issue 672
- Allow construction of an
RTCRtpSender
without an RTP DtlsTransport, as noted in: Issue 679 - Clarify syntax of
fingerprint
, as noted in: Issue 683
Changes since 20 August 2016
- Clarified operation of
resolutionScale
, as noted in: Issue 362 - Clarified meaning of the
disconnected
state, as noted in: Issue 565 - Changed
profileLevelId
to a DOMString, as noted in: Issue 587 - Enabled
setTrack()
to replace a track that is "ended", as noted in: Issue 589 - Clarified operation of
setTransport()
, as noted in: Issue 591 - Clarified behavior of
RTCRtpReceiver.stop()
, as noted in: Issue 596 - Clarified behavior of
RTCRtpSender.track.stop()
, as noted in: Issue 597 - Aligned ORTC with WebRTC 1.0 DTMF API, as noted in: Issue 604
- Clarified state transitions of the
RTCIceGatherer
, as noted in: Issue 606 - Clarified behavior of
RTCIceTransport.start()
, as noted in: Issue 607 - Clarified required attributes of an
RTCIceCandidate
, as noted in: Issue 608 - Enable
setTrack(null)
, as noted in: Issue 615 - Clarified meaning of
sender.track
set to null, as noted in: Issue 616
Changes since 04 May 2016
- Clarified support for simulcast reception and
MRST
SVC codecs, as noted in: Issue 175 - Clarified handling of media prior to remote fingerprint verification, as noted in: Issue 200
- Simplified text relating to event handlers, as noted in: Issue 309
- Clarified meaning of
RTCRtpCodecCapability
.options, as noted in: Issue 412 - Clarified exceptions and error conditions in the
RTCDtmfSender
, as noted in: Issue 446 - Provided
rtcp.ssrc
advice for implementations, as noted in: Issue 462 - Clarified effect of
RTCRtpReceiver.track.stop()
, as noted in: Issue 498 - Summarized header extension parameters implementation experience, as noted in: Issue 502
- Updated text relating to consent failures, as noted in: Issue 517
- Clarified
muxId
usage, as noted in: Issue 528 - Clarified meaning of
name
, as noted in: Issue 529 - Updated ICE transition diagram, as noted in: Issue 535
- Clarified "rtx" entries in
RTCRtpCodecCapability
andRTCRtpCodecParameters
, as noted in: Issue 539 - Updated text relating to "server could not be reached", as noted in: Issue 542
- Corrected codec name usage, as noted in: Issue 544 and Issue 548
- Clarified that
codecPayloadType
can be unset, as noted in: Issue 545 - Converted figures to SVG format with figure/caption markup, as noted in: Issue 572
Changes since 01 March 2016
- Added the
gather()
method, as noted in: Issue 165 - Removed "public" from
RTCIceGatherPolicy
, as noted in: Issue 224 - Removed the
minQuality
attribute, as noted in: Issue 351 - Made
send()
andreceive()
asynchronous, as noted in: Issue 399, Issue 463, Issue 468 and Issue 469 - Provided additional information on ICE candidate errors, as noted in: Issue 402
- Added
state
attribute toRTCSctpTransport
, as noted in: Issue 403 - Provided an example of RTX/RED/FEC configuration, as noted in: Issue 404
- Clarified
payloadType
uniqueness, as noted in: Issue 405 - Updated the list of header extensions, as noted in: Issue 409
- Added "goog-remb" to the list of feedback mechanisms, as noted in: Issue 410
- Added kind argument to the
RTCRtpReceiver
constructor, as noted in: Issue 411 - Clarified
send()
restrictions on kind, as noted in: Issue 414 - Added
getAlgorithm()
method, as noted in: Issue 427 - Changed
RTCDataChannel
protocol and label to USVString, as noted in: Issue 429 - Clarified nullable attributes and methods returning empty lists, as noted in: Issue 433
- Clarified support for the "direction" parameter, as noted in: Issue 442
- Clarified the apt capability of the "red" codec, as noted in: Issue 444
- Clarified usage of
RTCRtpEncodingParameters
attributes, as noted in: Issue 445 - Clarified firing of
onssrcconflict
event, as noted in: Issue 448 - Clarified that CNAME is only set on an
RTCRtpSender
, as noted in: Issue 450 - Updated references, as noted in: Issue 457
- Described behavior of
send()
andreceive()
with unsetRTCRtpEncodingParameters
, as noted in: Issue 461 - Corrected dictionary initialization in the examples, noted in: Issue 464 and Issue 465
- Corrected use of enums in the examples, noted in: Issue 466
- Clarified handling of identity constraints, as noted in: Issue 467 and Issue 468
- Clarified use of
RTCRtpEncodingParameters
, as noted in: Issue 470 - Changed hostCandidate type, as noted in: Issue 474
- Renamed state change event handlers to onstatechange, as noted in: Issue 475
- Updated description of
RTCIceGatherer
closed
state, as noted in: Issue 476 - Updated description of
RTCIceTransport
object, as noted in: Issue 477 - Updated description of
relatedPort
, as noted in: Issue 484 - Updated description of
RTCIceParameters
, as noted in: Issue 485 - Clarified exceptions in
RTCDataChannel
construction, as noted in: Issue 492 - Provided a reference to
error.message
, as noted in: Issue 495 - Clarified
RTCRtpReceiver
description, as noted in: Issue 496 - Clarified default for
clockRate
attribute, as noted in: Issue 500 - Removed use of "null if unset", as noted in: Issue 503
- Updated
RTCSctpTransport
constructor, as noted in: Issue 504 - Clarified behavior of
getCapabilities()
, as noted in: Issue 509 - Addressed issues with
RTCDataChannelParameters
, as noted in: Issue 519
Changes since 20 November 2015
- Clarified
unhandledrtp
event contents prior to callingreceive()
, as noted in: Issue 243 - Added support for
ptime
, as noted in: Issue 160 - Clarified behavior of
send()
when encodings is unset, as noted in: Issue 187 - Fixed invalid import in examples, as noted in: Issue 250
- Added support for Forward Error Correction (FEC), as noted in: Issue 253
- Added support for "V" bit in
RTCRtpContributingSource
, as noted in: Issue 263 - Added definition of
maxBitrate
, as noted in: Issue 267 - Clarified definition of
audioLevel
, as noted in: Issue 377 - Use USVString for
datachannel.send()
, as noted in: PR 387 - Clarified requirements for DTMF A-D tone support, as noted in: Issue 391
- Changed
RTCRtpContributingSource
from an interface to a dictionary, as noted in: Issue 289 - Added support for
maxFramerate
encoding parameter, as noted in: Issue 412 - Clarified behavior of
getRemoteCertificates()
, as noted in: Issue 378 - Added support for remote peer ICE-lite implementation, as noted in: Issue 293
- Clarified
RTCDtlsTransportState
definition, as noted in: Issue 294 - Added explanation for unset
iceServers
, as noted in: Issue 302 - Sync of certificate management API with WebRTC 1.0 changes, as noted in: Issue 303
- Added "public" to
RTCIceGatherPolicy
, as noted in: Issue 305 - Fixed problems in Examples 6, 7, 22 and 24, as noted in: Issue 310
- Clarified value of the
component
attribute, as noted in: Issue 314 - Clarified behavior with multiple local or remote certificates, as noted in: Issue 317
- Added
credentialType
attribute to Examples, as noted in: Issue 323 - Clarified alert handling in
RTCDtlsTransportState
, as noted in: Issue 327 - Added example
RTCIceTransportState
transitions, as noted in: Issue 332 - Clarified object garbage collection, as noted in: Issue 338
- Fixed certificate example errors, as noted in: Issue 340
- Clarified RTP matching rules, as noted in: Issue 344
- Clarified value of
rtcpTransport
for BUNDLE and RTP/RTCP mux use, as noted in: Issue 349 - Fixed markup issues in respec, as noted in: Issue 345
- Addressed issues with document anchor links, as noted in: Issue 353
- Clarified meaning of active for an
RTCRtpReceiver
, as noted in: Issue 355 - Updated
RTCDataChannel
event table, as noted in: Issue 358 - Clarified behavior of resolutionScale, as noted in: Issue 362
- Updated RTP matching rules in Section 6.5 to support FEC/RTX/RED, as noted in: Issue 368
- Clarified certificate checking behavior, as noted in: Issue 372
- Clarified
encodingId
syntax, as noted in: Issue 375 - Added
url
toRTCIceGathererEvent
, as noted in: Issue 376 - Added
RangeError
for resolutionScale <1.0, as noted in: Issue 379 - Added clarification on level asymmetry, as noted in: Issue 382
- Clarified DTMF tone requirements, as noted in: Issue 384
- Clarified Generic NACK settings, as noted in: Issue 395
Changes since 05 October 2015
- Added support for Opus capabilities and settings, as noted in: Issue 252
- Added
payloadType
attribute toRTCRtpRtxParameters
, as noted in: Issue 254 - Clarified meaning of unset
RTCRtpCodecCapability.clockRate
, as noted in: Issue 255 - Updated VP8 and H.264 capabilities and added VP8 and H.264 settings, as noted in: Issue 258
- Added RTX codec parameters, as noted in: Issue 259
- Added RED codec parameters, as noted in: Issue 260
- Substituted
degradationPreference
forframerateBias
and moved it toRTCRtpParameters
, as noted in: Issue 262 - Added RID support to the
unhandledrtp
event, as noted in: Issue 265 - Updated references, as noted in: Issue 268
- Changed codec parameter and option names to camelCase, as noted in: Issue 273
- Added section of codec options, as noted in: Issue 274
- Clarified meaning of codec capabilities and options, as noted in: Issue 275 and Issue 277
- Clarified behavior in
RTCRtpSender
constructor andsetTrack()
whentrack.readyState
is "ended", as noted in: Issue 278
Changes since 22 June 2015
- Added support for the WebRTC 1.0 certificate management API, as noted in: Issue 195
- Added certificate argument to the
RTCDtlsTransport
constructor, as noted in: Issue 218 - Added the
failed
state toRTCDtlsTransportState
, as noted in: Issue 219 - Changed
getNominatedCandidatePair
togetSelectedCandidatePair
, as noted in: Issue 220 - Added support for WebRTC 1.0
RTCIceCredentialType
, as noted in: Issue 222 - Clarified behavior of
createAssociatedGatherer()
, as noted in: Issue 223 - Changed spelling from "iceservers" to "iceServers" for consistency with WebRTC 1.0, as noted in: Issue 225
- Added support for SCTP port numbers, as noted in: Issue 227
- Changed "outbound-rtp" to "outboundrtp" within the Statistics API, as noted in: Issue 229
- Changed
maxPacketLifetime
andmaxRetransmits
from unsigned short to unsigned long, as noted in: Issue 231 - Clarified DataChannel negotiation, as noted in: Issue 233
- Added
getContributingSources()
method, as noted in: Issue 236 - Fixes to Examples 5 and 6, as noted in: Issue 237 and Issue 239
- Clarified behavior of
RTCDataChannel.send()
, as noted in: Issue 240 - Fixed typos in Example 11, as noted in: Issue 241 and Issue 248
- Added text relating to
RTCDataChannel
exceptions and errors, as noted in: Issue 242 - Reconciliation of
RTCRtpEncodingParameters
dictionary with WebRTC 1.0, as noted in: Issue 249
Changes since 7 May 2015
- Addressed Philipp Hancke's review comments, as noted in: Issue 198
- Added the
failed
state toRTCIceTransportState
, as noted in: Issue 199 - Added text relating to handling of incoming media packets prior to remote fingerprint verification, as noted in: Issue 200
- Added a
complete
attribute to theRTCIceCandidateComplete
dictionary, as noted in: Issue 207 - Updated the description of
RTCIceGatherer.close()
and theclosed
state, as noted in: Issue 208 - Updated Statistics API error handling to reflect proposed changes to the WebRTC 1.0 API, as noted in: Issue 214
- Updated Section 10 (RTCDtmfSender) to reflect changes in the WebRTC 1.0 API, as noted in: Issue 215
- Clarified state transitions due to consent failure, as noted in: Issue 216
- Added a reference to [[FEC]], as noted in: Issue 217
Changes since 25 March 2015
-
sender.setTrack()
updated to return a Promise, as noted in: Issue 148 - Added
RTCIceGatherer
as an optional argument to theRTCIceTransport
constructor, as noted in: Issue 174 - Clarified handling of contradictory RTP/RTCP multiplexing settings, as noted in: Issue 185
- Clarified error handling relating to
RTCIceTransport
,RTCDtlsTransport
andRTCIceGatherer
objects in theclosed
state, as noted in: Issue 186 - Added
component
attribute andcreateAssociatedGatherer()
method to theRTCIceGatherer
object, as noted in: Issue 188 - Added
close()
method to theRTCIceGatherer
object as noted in: Issue 189 - Clarified behavior of TCP candidate types, as noted in: Issue 190
- Clarified behavior of
iceGatherer.onlocalcandidate
, as noted in: Issue 191 - Updated terminology in Section 1.1 as noted in: Issue 193
- Updated
RTCDtlsTransportState
definitions, as noted in: Issue 194 - Updated
RTCIceTransportState
definitions, as noted in: Issue 197
Changes since 22 January 2015
- Updated Section 6.5 on RTP matching rules, as noted in: Issue 48
- Further updates to the Statistics API, reflecting: Issue 85
- Added support for
maxptime
, as noted in: Issue 160 - Revised the text relating to
RTCDtlsTransport.start()
, as noted in: Issue 168 - Clarified pre-requisites for
insertDTMF()
, based on: Issue 178 - Added Section 6.5.3 and updated Section 9.5.1 to clarify aspects of RTCP sending and receiving, based on: Issue 180
- Fixed miscellaneous typos, as noted in: Issue 183
- Added informative reference to [[RFC3264]] Section 5.1, as noted in: Issue 184
Changes since 14 October 2014
- Update to the Statistics API, reflecting: Issue 85
- Update on 'automatic' use of scalable video coding, as noted in: Issue 156
- Update to the H.264 parameters, as noted in: Issue 158
- Update to the 'Big Picture', as noted in: Issue 159
- Changed 'RTCIceTransportEvent' to 'RTCIceGathererEvent' as noted in: Issue 161
- Update to
RTCRtpUnhandledEvent
as noted in: Issue 163 - Added support for
RTCIceGatherer.state
as noted in: Issue 164 - Revised the text relating to
RTCIceTransport.start()
as noted in: Issue 166 - Added text relating to DTLS interoperability with WebRTC 1.0, as noted in: Issue 167
- Added a reference to the ICE consent specification, as noted in: Issue 171
Changes since 20 August 2014
- Address questions about
RTCDtlsTransport.start()
, as noted in: Issue 146 - Address questions about
RTCRtpCodecCapability.preferredPayloadType
, as noted in: Issue 147 - Address questions about
RTCRtpSender.setTrack()
error handling, as noted in: Issue 148 - Address 'automatic' use of scalable video coding (in
RTCRtpReceiver.receive()
) as noted in: Issue 149 - Renamed RTCIceListener to
RTCIceGatherer
as noted in: Issue 150 - Added text on multiplexing of STUN, TURN, DTLS and RTP/RTCP, as noted in: Issue 151
- Address issue with queueing of candidate events within the
RTCIceGatherer
, as noted in: Issue 152 - Clarify behavior of
RTCRtpReceiver.getCapabilities(kind)
, as noted in: Issue 153
Changes since 16 July 2014
- Clarification of the ICE restart issue, as noted in : Issue 93
- Clarified onerror usage in sender and receiver objects, as noted in: Issue 95
- Clarified SST-MS capability issue noted in: Issue 108
- Clarification of
send()
andreceive()
usage as noted in: Issue 119 - Changed ICE state diagram as noted in: Issue 122
- Removed getParameters methods and changed send() method as noted in: Issue 136
- Changed definition of framerateScale and resolutionScale as noted in: Issue 137
- Substituted
muxId
forreceiverId
as noted in: Issue 138 and Issue 140 - Clarified the setting of
track.kind
as described in: Issue 141 - Added SSRC conflict event to the
RTCRtpSender
, as described in: Issue 143 - Addressed the "end of candidates" issues noted in: Issue 142 and Issue 144
Changes since 16 June 2014
- Added section on WebRTC 1.0 compatibility issues, responding to Issue 66
- Added Identity support, as described in Issue 78
- Reworked
getStats()
method, as described in Issue 85 - Removed ICE restart method described in Issue 93
- Addressed CNAME and synchronization context issues described in Issue 94
- Fixed WebIDL issues noted in Issue 97
- Addressed NITs described in Issue 99
- DTLS transport issues fixed as described in Issue 100
- ICE transport issues fixed as described in Issue 101
- ICE transport controller fixes made as described in Issue 102
- Sender and Receiver object fixes made as described in Issue 103
- Fixed
RTCRtpEncodingParameters
default issues described in Issue 104 - Fixed 'Big Picture' issues descibed in Issue 105
- Fixed
RTCRtpParameters
default issues described in Issue 106 - Added a multi-stream capability, as noted in Issue 108
- Removed quality scalability capabilities and parameters, as described in Issue 109
- Added scalability examples as requested in Issue 110
- Addressed WebRTC 1.0 Data Channel compatibility issue described in Issue 111
- Removed header extensions from
RTCRtpCodecParameters
as described in Issue 113 - Addressed RTP/RTCP non-mux issues with IdP as described in Issue 114
- Added getParameter methods to
RTCRtpSender
andRTCRtpReceiver
objects, as described in Issue 116 - Added layering diagrams as requested in Issue 117
- Added a typedef for
payloadtype
, as described in Issue 118 - Moved
onerror
from theRTCIceTransport
object to theRTCIceListener
object as described in Issue 121 - Added explanation of Voice Activity Detection (VAD), responding to Issue 129
- Clarified the meaning of
maxTemporalLayers
andmaxSpatialLayers
, as noted in Issue 130 - Added [[!RFC6051]] to the list of header extensions and removed RFC 5450, as noted in Issue 131
- Addressed ICE terminology issues, as described in Issue 132
- Separated references into Normative and Informative, as noted in Issue 133
Changes since 14 May 2014
- Added support for non-multiplexed RTP/RTCP and ICE freezing, as described in Issue 57
- Added support for
getRemoteCertificates()
, as described in Issue 67 - Removed
filterParameters()
andcreateParameters()
methods, as described in Issue 80 - Partially addressed capabilities issues, as described in Issue 84
- Addressed WebIDL type issues described in Issue 88
- Addressed Overview section issues described in Issue 91
- Addressed readonly attribute issues described in Issue 92
- Added ICE restart method to address the issue described in Issue 93
- Added onerror eventhandler to sender and receiver objects as described in Issue 95
Changes since 29 April 2014
- ICE restart explanation added, as described in Issue 59
- Fixes for error handling, as described in Issue 75
- Fixes for miscellaneous NITs, as described in Issue 76
- Enable retrieval of the SSRC to be used by RTCP, as described in Issue 77
- Support for retrieval of audio and video capabilities, as described in Issue 81
- getStats interface updated, as described in Issue 82
- Partially addressed SVC issues described in Issue 83
- Partially addressed statistics update issues described in Issue 85
Changes since 12 April 2014
- Fixes for error handling, as described in Issue 26
- Support for contributing sources removed (re-classified as a 1.2 feature), as described in Issue 27
- Cleanup of DataChannel construction, as described in Issue 60
- Separate proposal on simulcast/layering, as described in Issue 61
- Separate proposal on quality, as described in Issue 62
- Fix for TCP candidate type, as described in Issue 63
- Fix to the fingerprint attribute, as described in Issue 64
- Fix to RTCRtpFeatures, as described in Issue 65
- Support for retrieval of remote certificates, as described in Issue 67
- Support for ICE error handling, described in Issue 68
- Support for Data Channel send rate control, as described in Issue 69
- Support for capabilities and settings, as described in Issue 70
- Removal of duplicate RTCIceListener functionality, as described in Issue 71
- ICE gathering state added, as described in Issue 72
- Removed ICE role from the ICE transport constructor, as described in Issue 73
Changes since 13 February 2014
- Support for contributing source information added, as described in Issue 27
- Support for control of quality, resolution, framerate and layering added, as described in Issue 31
-
RTCRtpListener
object added and figure in Section 1 updated, as described in Issue 32 - More complete support for RTP and Codec Parameters added, as described in Issue 33
- Data Channel transport problem fixed, as described in Issue 34
- Various NITs fixed, as described in Issue 37
-
RTCDtlsTransport
operation and interface definition updates, as described in: Issue 38 - Default values of some dictionary attributes added, to partially address the issue described in: Issue 39
- Support for ICE TCP added, as described in Issue 41
- Fixed issue with sequences as attributes, as described in Issue 43
- Fix for issues with onlocalcandidate, as described in Issue 44
- Initial stab at a Stats API, as requested in Issue 46
- Added support for ICE gather policy, as described in Issue 47
Changes since 07 November 2013
- RTCTrack split into
RTCRtpSender
andRTCRtpReceiver
objects, as proposed on 06 January 2014. - RTCConnection split into
RTCIceTransport
andRTCDtlsTransport
objects, as proposed on 09 January 2014. -
RTCSctpTransport
object added, as described in Issue 25 - RTCRtpHeaderExtensionParameters added, as described in Issue 28
- RTCIceListener added, in order to support parallel forking, as described in Issue 29
- DTMF support added, as described in Issue 30