Exporters From Japan
Wholesale exporters from Japan   Company Established 1983
CARVIEW
Select Language

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 type DOMHighResTimeStamp [[!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 this RTCStats dictionary represents.

id of type DOMString

A unique id that is associated with the object that was inspected to produce this RTCStats object. Two RTCStats objects, extracted from two different RTCStatsReport objects, MUST have the same id if they were produced by inspecting the same underlying object. User agents are free to pick any format for the id 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 the RTCRtpReceiver object; remote inbound RTP statistics can be obtained from the RTCRtpSender 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 the RTCRtpSender object; remote outbound RTP statistics can be obtained from the RTCRtpReceiver object.

"data-channel"

Statistics relating to each RTCDataChannel id. It is accessed via the RTCDataChannelStats defined in [[!WEBRTC-STATS]] Section 7.8.

"track"

Statistics relating to the MediaStreamTrack object. It is accessed via the RTCMediaStreamTrackStats defined in [[!WEBRTC-STATS]] Section 7.7.

"transport"

Transport statistics related to the RTCDtlsTransport object. It is accessed via the RTCTransportStats defined in [[!WEBRTC-STATS]] Sections 7.9.

"candidate-pair"

ICE candidate pair statistics related to RTCIceTransport objects. It is accessed via the RTCIceCandidatePairStats defined in [[!WEBRTC-STATS]] Section 7.11.

"local-candidate"

ICE local candidate statistics, related to RTCIceGatherer objects. It is accessed via the RTCIceCandidateStats 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 the RTCIceCandidateStats 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 the RTCCertificateStats 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:

  1. If the RTCIdentity object's transport.state attribute is closed, throw an InvalidStateError.

  2. If options.protocol includes the the character '/' or '\', throw a SyntaxError.

  3. Set the current identity provider values to the tuple (provider, options).

  4. 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:

  1. If the RTCIdentity object's transport.state attribute is closed, throw an InvalidStateError.

  2. Request an identity assertion from the IdP.

  3. 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:

  1. If the setIdentityProvider() method has been called, the IdP provided shall be used.
  2. 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:

  1. 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.

  2. The RTCIdentity invokes the generateAssertion method on the RTCIdentityProvider 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 the RTCDtlsTransport 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 to setIdentityProvider, if any such value was provided.

  3. 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.

  4. If the IdP proxy produces an error or returns a promise that does not resolve to a valid RTCIdentityAssertionResult (see ), then assertion generation fails.

  5. The RTCIdentity MAY store the identity assertion for future use. If a fresh identity assertion is needed for any reason, applications can create a new RTCIdentity.

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:

  1. The RTCIdentity awaits any prior identity validation. Only one identity validation can run at a time for an RTCIdentity instance.

  2. 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]].

  3. If the identity assertion is malformed, or if protocol includes the character '/' or '\', this process fails.

  4. 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.

  5. The RTCIdentity invokes the validateAssertion 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.

  6. 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.

  7. If the IdP proxy produces an error or returns a promise that does not resolve to a valid RTCIdentityValidationResult (see ), then identity validation fails.

  8. 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.

  9. The RTCIdentity decodes the contents attribute of RTCIdentityValidationResult 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 treat contents as opaque and return the same string to allow for future extensions.

  10. 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.

  11. The RTCIdentity resolves the peerIdentity attribute with a new instance of RTCIdentityAssertion that includes the IdP domain and peer identity.

  12. 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 to generateCertificate. If this parameter is present it indicates the maximum time that the RTCCertificate is valid for relative to the current time.

When generateCertificate is called with an object argument, the user agent attempts to convert the object into an RTCCertificateExpiration. If this is unsuccessful, immediately return a promise that is rejected with a newly created TypeError 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. The expires attribute of the returned RTCCertificate is set to the expiration time of the certificate. A user agent MAY choose to limit the value of the expires 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 one AlgorithmIdentifier for each supported hash algorithm that can be used with RSA, using default/recommended values for modulusLength and publicExponent (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 the RTCCertificate interface. The returned RTCCertificate 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. The keygenAlgorithm argument uses the WebCrypto [[!WebCryptoAPI]] AlgorithmIdentifier type. The keygenAlgorithm value MUST be a valid argument to window.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 of generateKey and a [[supportedAlgorithms]] value specific to production of certificates for RTCDtlsTransport. If the algorithm normalization process produces an error, the call to generateCertificate() 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 normalized AlgorithmIdentifier) 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 or RTCQuicTransport, 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 a DOMTimeStamp value, it indicates the maximum time that the RTCCertificate is valid for relative to the current time. A user agent sets the expires attribute of the returned RTCCertificate to the current time plus the value of the expires attribute. However, a user agent MAY choose to limit the period over which an RTCCertificate is valid.

A user agent MUST reject a call to generateCertificate() with a DOMError of type "NotSupportedError" if the keygenAlgorithm parameter identifies an algorithm that the user agent cannot or will not use to generate a certificate for RTCDtlsTransport.

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:

  1. Let input and memory be the corresponding inputs defined by the internal structured cloning algorithm, where input represents an RTCCertificate object to be cloned.
  2. Let output be a newly constructed RTCCertificate object.
  3. Copy the value of the expires attribute from input to output.
  4. 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.
  5. 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

  1. Update finding common capabilities example, as noted in: Issue 569
  2. Add checks for header extension conflicts, as noted in: Issue 803
  3. Update RTCIdentity (now in Section 14) to reference [[WEBRTC-IDENTITY]], as noted in: Issue 813
  4. Update the RTCDataChannel interface to match WebRTC 1.0, as noted in: Issue 817
  5. Update the RTCSctpTransport interface to match WebRTC 1.0, as noted in: Issue 820
  6. Clarify the operation of the RTCCertificate keying material internal slot, as noted in: Issue 832
  7. Update mandatory-to-implement statistics, as noted in: Issue 833
  8. Separate RTCRtpSendParameters and RTCRtpReceiveParameters, as noted in: Issue 835
  9. Remove Section 13 (RTCQuicTransport) and Section 14 (RTCQuicStream), and reference [[WEBRTC-QUIC]], as noted in: Issue 853
  10. Update RID usage in examples, as noted in: Issue 865

Changes since 22 September 2017

  1. Add error checks in send, as noted in: Issue 473
  2. Support priority in RTCDataChannel, as noted in: Issue 623
  3. Fix issues with maxMessageSize in RTCSctpCapabilities, as noted in: Issue 626
  4. Clarify handling of unsupported fingerprint algorithms, as noted in: Issue 752
  5. Add [Exposed] to interfaces, as noted in: Issue 766
  6. Clarify operation of the RTCRtpSender and RTCRtpReceiver constructor, as noted in: Issue 778
  7. Clarify definition of RTCQuicStreamState, as noted in: Issue 788
  8. Reference WebRTC 1.0 for definitions of RTCIceCredentialType and RTCOauthCredential, as noted in: Issue 792
  9. Allow construction of an RTCRtpReceiver object without a transport, as noted in: Issue 801
  10. Clarify track.muted default in RTCRtpReceiver constructor, as noted in: Issue 807
  11. Allow null transport argument to setTransport, as noted in: Issue 808
  12. Update the RTCRtpContributingSource and RTCRtpSynchronizationSource dictionaries to match WebRTC 1.0, as noted in: Issue 809
  13. Update the RTCCertificate interface to match WebRTC 1.0, as noted in: Issue 812

Changes since 01 May 2017

  1. Add checks in the send method, as noted in: Issue 564
  2. Add support for reliable QUIC data exchange, as noted in: Issue 584
  3. Add a compliance section, as noted in: Issue 586
  4. Change type of maxFramerate to double, as noted in: Issue 687
  5. Change codec parameter names from camelCase to SDP-style names, as noted in: Issue 689
  6. Clarify operation of RTCDtlsTransport.getLocalParameters, as noted in: Issue 690
  7. Reference WebIDL definition of ArrayBuffer, as noted in: Issue 692
  8. Define getCertificates() method and remove certificates attribute, as noted in: Issue 696
  9. Clarify sender settings for "flexfec", as noted in: Issue 698
  10. Add a Privacy and Security section, as noted in: Issue 705
  11. Mark getAlgorithm as a "feature at risk", as noted in: Issue 707
  12. Mark the QoS/Priority API as a "feature at risk", as noted in: Issue 708
  13. Add validation steps in the RTCDataChannel constructor, as noted in: Issue 717
  14. Update contributing and synchronization sources for compatibility with WebRTC 1.0, as noted in: Issue 718
  15. Update DTMF support for compatibility with WebRTC 1.0, as noted in: Issue 719
  16. Synchronize with WebRTC 1.0 changes to ICE, as noted in: Issue 720
  17. Clarify key shortening behavior with use of OAuth credentials, as noted in: Issue 721
  18. Enable setTrack/replaceTrack argument to be null, as noted in: Issue 722
  19. Update with WebRTC 1.0 changes to RTCRtpParameters, as noted in: Issue 723
  20. Add support for DTLS error reporting, as noted in: Issue 724
  21. Fix race conditions in the DTMF examples, as noted in: Issue 732
  22. Change numChannels to channels, as noted in: Issue 738
  23. Clarify behavior of getCapabilities, as noted in: Issue 740
  24. Remove the nohost gathering policy, as noted in: Issue 742
  25. Add support for the getDefaultIceServers method, as noted in: Issue 743
  26. Update RTCStatsType values based on WebRTC 1.0, as noted in: Issue 745
  27. Add validation steps in the RTCIceGatherer constructor, as noted in: Issue 748

Changes since 02 December 2016

  1. Updated the RTP matching rules (Section 6.5) to address issues Issue 368 and Issue 547.
  2. Clarified handling of H.264 packetizationMode in RTCRtpCodecCapability, as noted in: Issue 567
  3. Provided updated guidance on use of multiple encodings as noted in: Issue 568
  4. Added support for replaceTrack, as noted in: Issue 614
  5. Updated Oauth token auth support, as noted in: Issue 618
  6. Enabled setting of the RTCSctpTransport remote port, as noted in: Issue 625
  7. Changed the maxMessageSize attribute type to unsigned long, as noted in: Issue 626
  8. Clarified handling of RTX in RTCRtpCapabilities.codecs, as noted in: Issue 627
  9. Clarified RTCSctpTransportState definitions, as noted in: Issue 635
  10. Changed RTCIceComponent values to lower case, as noted in: Issue 636
  11. Described the firing of the mute and unmute events, as noted in: Issue 639
  12. Added optional H.264 codec settings, as noted in: Issue 641
  13. Updated Section 6.5.3 to refer to RTCP packet routing specification, as noted in: Issue 643
  14. Updated Examples 21 and 22 to reflect updated RTCSctpTransport API, as noted in: Issue 648
  15. Provided details on the operation of RTCIceTransport.stop, as noted in: Issue 651
  16. Clarified the purpose of RTCRtpCodecCapabilities.fecMechanisms, as noted in: Issue 655
  17. Allowed an RTCRtpSender to be constructed with a MediaStreamTrack or kind, as noted in: Issue 656
  18. Clarified when multiple RTCRtpCodecCapability entries are provided for the same codec, as noted in: Issue 662
  19. Marked Identity as a "feature at risk", as noted in: Issue 668
  20. Updated Statistics API to track changes to WebRTC Statistics specification, as noted in: Issue 672
  21. Allow construction of an RTCRtpSender without an RTP DtlsTransport, as noted in: Issue 679
  22. Clarify syntax of fingerprint, as noted in: Issue 683

Changes since 20 August 2016

  1. Clarified operation of resolutionScale, as noted in: Issue 362
  2. Clarified meaning of the disconnected state, as noted in: Issue 565
  3. Changed profileLevelId to a DOMString, as noted in: Issue 587
  4. Enabled setTrack() to replace a track that is "ended", as noted in: Issue 589
  5. Clarified operation of setTransport(), as noted in: Issue 591
  6. Clarified behavior of RTCRtpReceiver.stop(), as noted in: Issue 596
  7. Clarified behavior of RTCRtpSender.track.stop(), as noted in: Issue 597
  8. Aligned ORTC with WebRTC 1.0 DTMF API, as noted in: Issue 604
  9. Clarified state transitions of the RTCIceGatherer, as noted in: Issue 606
  10. Clarified behavior of RTCIceTransport.start(), as noted in: Issue 607
  11. Clarified required attributes of an RTCIceCandidate, as noted in: Issue 608
  12. Enable setTrack(null), as noted in: Issue 615
  13. Clarified meaning of sender.track set to null, as noted in: Issue 616

Changes since 04 May 2016

  1. Clarified support for simulcast reception and MRST SVC codecs, as noted in: Issue 175
  2. Clarified handling of media prior to remote fingerprint verification, as noted in: Issue 200
  3. Simplified text relating to event handlers, as noted in: Issue 309
  4. Clarified meaning of RTCRtpCodecCapability.options, as noted in: Issue 412
  5. Clarified exceptions and error conditions in the RTCDtmfSender, as noted in: Issue 446
  6. Provided rtcp.ssrc advice for implementations, as noted in: Issue 462
  7. Clarified effect of RTCRtpReceiver.track.stop(), as noted in: Issue 498
  8. Summarized header extension parameters implementation experience, as noted in: Issue 502
  9. Updated text relating to consent failures, as noted in: Issue 517
  10. Clarified muxId usage, as noted in: Issue 528
  11. Clarified meaning of name, as noted in: Issue 529
  12. Updated ICE transition diagram, as noted in: Issue 535
  13. Clarified "rtx" entries in RTCRtpCodecCapability and RTCRtpCodecParameters, as noted in: Issue 539
  14. Updated text relating to "server could not be reached", as noted in: Issue 542
  15. Corrected codec name usage, as noted in: Issue 544 and Issue 548
  16. Clarified that codecPayloadType can be unset, as noted in: Issue 545
  17. Converted figures to SVG format with figure/caption markup, as noted in: Issue 572

Changes since 01 March 2016

  1. Added the gather() method, as noted in: Issue 165
  2. Removed "public" from RTCIceGatherPolicy, as noted in: Issue 224
  3. Removed the minQuality attribute, as noted in: Issue 351
  4. Made send() and receive() asynchronous, as noted in: Issue 399, Issue 463, Issue 468 and Issue 469
  5. Provided additional information on ICE candidate errors, as noted in: Issue 402
  6. Added state attribute to RTCSctpTransport, as noted in: Issue 403
  7. Provided an example of RTX/RED/FEC configuration, as noted in: Issue 404
  8. Clarified payloadType uniqueness, as noted in: Issue 405
  9. Updated the list of header extensions, as noted in: Issue 409
  10. Added "goog-remb" to the list of feedback mechanisms, as noted in: Issue 410
  11. Added kind argument to the RTCRtpReceiver constructor, as noted in: Issue 411
  12. Clarified send() restrictions on kind, as noted in: Issue 414
  13. Added getAlgorithm() method, as noted in: Issue 427
  14. Changed RTCDataChannel protocol and label to USVString, as noted in: Issue 429
  15. Clarified nullable attributes and methods returning empty lists, as noted in: Issue 433
  16. Clarified support for the "direction" parameter, as noted in: Issue 442
  17. Clarified the apt capability of the "red" codec, as noted in: Issue 444
  18. Clarified usage of RTCRtpEncodingParameters attributes, as noted in: Issue 445
  19. Clarified firing of onssrcconflict event, as noted in: Issue 448
  20. Clarified that CNAME is only set on an RTCRtpSender, as noted in: Issue 450
  21. Updated references, as noted in: Issue 457
  22. Described behavior of send() and receive() with unset RTCRtpEncodingParameters, as noted in: Issue 461
  23. Corrected dictionary initialization in the examples, noted in: Issue 464 and Issue 465
  24. Corrected use of enums in the examples, noted in: Issue 466
  25. Clarified handling of identity constraints, as noted in: Issue 467 and Issue 468
  26. Clarified use of RTCRtpEncodingParameters, as noted in: Issue 470
  27. Changed hostCandidate type, as noted in: Issue 474
  28. Renamed state change event handlers to onstatechange, as noted in: Issue 475
  29. Updated description of RTCIceGatherer closed state, as noted in: Issue 476
  30. Updated description of RTCIceTransport object, as noted in: Issue 477
  31. Updated description of relatedPort, as noted in: Issue 484
  32. Updated description of RTCIceParameters, as noted in: Issue 485
  33. Clarified exceptions in RTCDataChannel construction, as noted in: Issue 492
  34. Provided a reference to error.message, as noted in: Issue 495
  35. Clarified RTCRtpReceiver description, as noted in: Issue 496
  36. Clarified default for clockRate attribute, as noted in: Issue 500
  37. Removed use of "null if unset", as noted in: Issue 503
  38. Updated RTCSctpTransport constructor, as noted in: Issue 504
  39. Clarified behavior of getCapabilities(), as noted in: Issue 509
  40. Addressed issues with RTCDataChannelParameters, as noted in: Issue 519

Changes since 20 November 2015

  1. Clarified unhandledrtp event contents prior to calling receive(), as noted in: Issue 243
  2. Added support for ptime, as noted in: Issue 160
  3. Clarified behavior of send() when encodings is unset, as noted in: Issue 187
  4. Fixed invalid import in examples, as noted in: Issue 250
  5. Added support for Forward Error Correction (FEC), as noted in: Issue 253
  6. Added support for "V" bit in RTCRtpContributingSource, as noted in: Issue 263
  7. Added definition of maxBitrate, as noted in: Issue 267
  8. Clarified definition of audioLevel, as noted in: Issue 377
  9. Use USVString for datachannel.send(), as noted in: PR 387
  10. Clarified requirements for DTMF A-D tone support, as noted in: Issue 391
  11. Changed RTCRtpContributingSource from an interface to a dictionary, as noted in: Issue 289
  12. Added support for maxFramerate encoding parameter, as noted in: Issue 412
  13. Clarified behavior of getRemoteCertificates(), as noted in: Issue 378
  14. Added support for remote peer ICE-lite implementation, as noted in: Issue 293
  15. Clarified RTCDtlsTransportState definition, as noted in: Issue 294
  16. Added explanation for unset iceServers, as noted in: Issue 302
  17. Sync of certificate management API with WebRTC 1.0 changes, as noted in: Issue 303
  18. Added "public" to RTCIceGatherPolicy, as noted in: Issue 305
  19. Fixed problems in Examples 6, 7, 22 and 24, as noted in: Issue 310
  20. Clarified value of the component attribute, as noted in: Issue 314
  21. Clarified behavior with multiple local or remote certificates, as noted in: Issue 317
  22. Added credentialType attribute to Examples, as noted in: Issue 323
  23. Clarified alert handling in RTCDtlsTransportState, as noted in: Issue 327
  24. Added example RTCIceTransportState transitions, as noted in: Issue 332
  25. Clarified object garbage collection, as noted in: Issue 338
  26. Fixed certificate example errors, as noted in: Issue 340
  27. Clarified RTP matching rules, as noted in: Issue 344
  28. Clarified value of rtcpTransport for BUNDLE and RTP/RTCP mux use, as noted in: Issue 349
  29. Fixed markup issues in respec, as noted in: Issue 345
  30. Addressed issues with document anchor links, as noted in: Issue 353
  31. Clarified meaning of active for an RTCRtpReceiver, as noted in: Issue 355
  32. Updated RTCDataChannel event table, as noted in: Issue 358
  33. Clarified behavior of resolutionScale, as noted in: Issue 362
  34. Updated RTP matching rules in Section 6.5 to support FEC/RTX/RED, as noted in: Issue 368
  35. Clarified certificate checking behavior, as noted in: Issue 372
  36. Clarified encodingId syntax, as noted in: Issue 375
  37. Added url to RTCIceGathererEvent, as noted in: Issue 376
  38. Added RangeError for resolutionScale <1.0, as noted in: Issue 379
  39. Added clarification on level asymmetry, as noted in: Issue 382
  40. Clarified DTMF tone requirements, as noted in: Issue 384
  41. Clarified Generic NACK settings, as noted in: Issue 395

Changes since 05 October 2015

  1. Added support for Opus capabilities and settings, as noted in: Issue 252
  2. Added payloadType attribute to RTCRtpRtxParameters, as noted in: Issue 254
  3. Clarified meaning of unset RTCRtpCodecCapability.clockRate, as noted in: Issue 255
  4. Updated VP8 and H.264 capabilities and added VP8 and H.264 settings, as noted in: Issue 258
  5. Added RTX codec parameters, as noted in: Issue 259
  6. Added RED codec parameters, as noted in: Issue 260
  7. Substituted degradationPreference for framerateBias and moved it to RTCRtpParameters, as noted in: Issue 262
  8. Added RID support to the unhandledrtp event, as noted in: Issue 265
  9. Updated references, as noted in: Issue 268
  10. Changed codec parameter and option names to camelCase, as noted in: Issue 273
  11. Added section of codec options, as noted in: Issue 274
  12. Clarified meaning of codec capabilities and options, as noted in: Issue 275 and Issue 277
  13. Clarified behavior in RTCRtpSender constructor and setTrack() when track.readyState is "ended", as noted in: Issue 278

Changes since 22 June 2015

  1. Added support for the WebRTC 1.0 certificate management API, as noted in: Issue 195
  2. Added certificate argument to the RTCDtlsTransport constructor, as noted in: Issue 218
  3. Added the failed state to RTCDtlsTransportState, as noted in: Issue 219
  4. Changed getNominatedCandidatePair to getSelectedCandidatePair, as noted in: Issue 220
  5. Added support for WebRTC 1.0 RTCIceCredentialType, as noted in: Issue 222
  6. Clarified behavior of createAssociatedGatherer(), as noted in: Issue 223
  7. Changed spelling from "iceservers" to "iceServers" for consistency with WebRTC 1.0, as noted in: Issue 225
  8. Added support for SCTP port numbers, as noted in: Issue 227
  9. Changed "outbound-rtp" to "outboundrtp" within the Statistics API, as noted in: Issue 229
  10. Changed maxPacketLifetime and maxRetransmits from unsigned short to unsigned long, as noted in: Issue 231
  11. Clarified DataChannel negotiation, as noted in: Issue 233
  12. Added getContributingSources() method, as noted in: Issue 236
  13. Fixes to Examples 5 and 6, as noted in: Issue 237 and Issue 239
  14. Clarified behavior of RTCDataChannel.send(), as noted in: Issue 240
  15. Fixed typos in Example 11, as noted in: Issue 241 and Issue 248
  16. Added text relating to RTCDataChannel exceptions and errors, as noted in: Issue 242
  17. Reconciliation of RTCRtpEncodingParameters dictionary with WebRTC 1.0, as noted in: Issue 249

Changes since 7 May 2015

  1. Addressed Philipp Hancke's review comments, as noted in: Issue 198
  2. Added the failed state to RTCIceTransportState, as noted in: Issue 199
  3. Added text relating to handling of incoming media packets prior to remote fingerprint verification, as noted in: Issue 200
  4. Added a complete attribute to the RTCIceCandidateComplete dictionary, as noted in: Issue 207
  5. Updated the description of RTCIceGatherer.close() and the closed state, as noted in: Issue 208
  6. Updated Statistics API error handling to reflect proposed changes to the WebRTC 1.0 API, as noted in: Issue 214
  7. Updated Section 10 (RTCDtmfSender) to reflect changes in the WebRTC 1.0 API, as noted in: Issue 215
  8. Clarified state transitions due to consent failure, as noted in: Issue 216
  9. Added a reference to [[FEC]], as noted in: Issue 217

Changes since 25 March 2015

  1. sender.setTrack() updated to return a Promise, as noted in: Issue 148
  2. Added RTCIceGatherer as an optional argument to the RTCIceTransport constructor, as noted in: Issue 174
  3. Clarified handling of contradictory RTP/RTCP multiplexing settings, as noted in: Issue 185
  4. Clarified error handling relating to RTCIceTransport, RTCDtlsTransport and RTCIceGatherer objects in the closed state, as noted in: Issue 186
  5. Added component attribute and createAssociatedGatherer() method to the RTCIceGatherer object, as noted in: Issue 188
  6. Added close() method to the RTCIceGatherer object as noted in: Issue 189
  7. Clarified behavior of TCP candidate types, as noted in: Issue 190
  8. Clarified behavior of iceGatherer.onlocalcandidate, as noted in: Issue 191
  9. Updated terminology in Section 1.1 as noted in: Issue 193
  10. Updated RTCDtlsTransportState definitions, as noted in: Issue 194
  11. Updated RTCIceTransportState definitions, as noted in: Issue 197

Changes since 22 January 2015

  1. Updated Section 6.5 on RTP matching rules, as noted in: Issue 48
  2. Further updates to the Statistics API, reflecting: Issue 85
  3. Added support for maxptime, as noted in: Issue 160
  4. Revised the text relating to RTCDtlsTransport.start(), as noted in: Issue 168
  5. Clarified pre-requisites for insertDTMF(), based on: Issue 178
  6. Added Section 6.5.3 and updated Section 9.5.1 to clarify aspects of RTCP sending and receiving, based on: Issue 180
  7. Fixed miscellaneous typos, as noted in: Issue 183
  8. Added informative reference to [[RFC3264]] Section 5.1, as noted in: Issue 184

Changes since 14 October 2014

  1. Update to the Statistics API, reflecting: Issue 85
  2. Update on 'automatic' use of scalable video coding, as noted in: Issue 156
  3. Update to the H.264 parameters, as noted in: Issue 158
  4. Update to the 'Big Picture', as noted in: Issue 159
  5. Changed 'RTCIceTransportEvent' to 'RTCIceGathererEvent' as noted in: Issue 161
  6. Update to RTCRtpUnhandledEvent as noted in: Issue 163
  7. Added support for RTCIceGatherer.state as noted in: Issue 164
  8. Revised the text relating to RTCIceTransport.start() as noted in: Issue 166
  9. Added text relating to DTLS interoperability with WebRTC 1.0, as noted in: Issue 167
  10. Added a reference to the ICE consent specification, as noted in: Issue 171

Changes since 20 August 2014

  1. Address questions about RTCDtlsTransport.start(), as noted in: Issue 146
  2. Address questions about RTCRtpCodecCapability.preferredPayloadType, as noted in: Issue 147
  3. Address questions about RTCRtpSender.setTrack() error handling, as noted in: Issue 148
  4. Address 'automatic' use of scalable video coding (in RTCRtpReceiver.receive()) as noted in: Issue 149
  5. Renamed RTCIceListener to RTCIceGatherer as noted in: Issue 150
  6. Added text on multiplexing of STUN, TURN, DTLS and RTP/RTCP, as noted in: Issue 151
  7. Address issue with queueing of candidate events within the RTCIceGatherer, as noted in: Issue 152
  8. Clarify behavior of RTCRtpReceiver.getCapabilities(kind), as noted in: Issue 153

Changes since 16 July 2014

  1. Clarification of the ICE restart issue, as noted in : Issue 93
  2. Clarified onerror usage in sender and receiver objects, as noted in: Issue 95
  3. Clarified SST-MS capability issue noted in: Issue 108
  4. Clarification of send() and receive() usage as noted in: Issue 119
  5. Changed ICE state diagram as noted in: Issue 122
  6. Removed getParameters methods and changed send() method as noted in: Issue 136
  7. Changed definition of framerateScale and resolutionScale as noted in: Issue 137
  8. Substituted muxId for receiverId as noted in: Issue 138 and Issue 140
  9. Clarified the setting of track.kind as described in: Issue 141
  10. Added SSRC conflict event to the RTCRtpSender, as described in: Issue 143
  11. Addressed the "end of candidates" issues noted in: Issue 142 and Issue 144

Changes since 16 June 2014

  1. Added section on WebRTC 1.0 compatibility issues, responding to Issue 66
  2. Added Identity support, as described in Issue 78
  3. Reworked getStats() method, as described in Issue 85
  4. Removed ICE restart method described in Issue 93
  5. Addressed CNAME and synchronization context issues described in Issue 94
  6. Fixed WebIDL issues noted in Issue 97
  7. Addressed NITs described in Issue 99
  8. DTLS transport issues fixed as described in Issue 100
  9. ICE transport issues fixed as described in Issue 101
  10. ICE transport controller fixes made as described in Issue 102
  11. Sender and Receiver object fixes made as described in Issue 103
  12. Fixed RTCRtpEncodingParameters default issues described in Issue 104
  13. Fixed 'Big Picture' issues descibed in Issue 105
  14. Fixed RTCRtpParameters default issues described in Issue 106
  15. Added a multi-stream capability, as noted in Issue 108
  16. Removed quality scalability capabilities and parameters, as described in Issue 109
  17. Added scalability examples as requested in Issue 110
  18. Addressed WebRTC 1.0 Data Channel compatibility issue described in Issue 111
  19. Removed header extensions from RTCRtpCodecParameters as described in Issue 113
  20. Addressed RTP/RTCP non-mux issues with IdP as described in Issue 114
  21. Added getParameter methods to RTCRtpSender and RTCRtpReceiver objects, as described in Issue 116
  22. Added layering diagrams as requested in Issue 117
  23. Added a typedef for payloadtype, as described in Issue 118
  24. Moved onerror from the RTCIceTransport object to the RTCIceListener object as described in Issue 121
  25. Added explanation of Voice Activity Detection (VAD), responding to Issue 129
  26. Clarified the meaning of maxTemporalLayers and maxSpatialLayers, as noted in Issue 130
  27. Added [[!RFC6051]] to the list of header extensions and removed RFC 5450, as noted in Issue 131
  28. Addressed ICE terminology issues, as described in Issue 132
  29. Separated references into Normative and Informative, as noted in Issue 133

Changes since 14 May 2014

  1. Added support for non-multiplexed RTP/RTCP and ICE freezing, as described in Issue 57
  2. Added support for getRemoteCertificates(), as described in Issue 67
  3. Removed filterParameters() and createParameters() methods, as described in Issue 80
  4. Partially addressed capabilities issues, as described in Issue 84
  5. Addressed WebIDL type issues described in Issue 88
  6. Addressed Overview section issues described in Issue 91
  7. Addressed readonly attribute issues described in Issue 92
  8. Added ICE restart method to address the issue described in Issue 93
  9. Added onerror eventhandler to sender and receiver objects as described in Issue 95

Changes since 29 April 2014

  1. ICE restart explanation added, as described in Issue 59
  2. Fixes for error handling, as described in Issue 75
  3. Fixes for miscellaneous NITs, as described in Issue 76
  4. Enable retrieval of the SSRC to be used by RTCP, as described in Issue 77
  5. Support for retrieval of audio and video capabilities, as described in Issue 81
  6. getStats interface updated, as described in Issue 82
  7. Partially addressed SVC issues described in Issue 83
  8. Partially addressed statistics update issues described in Issue 85

Changes since 12 April 2014

  1. Fixes for error handling, as described in Issue 26
  2. Support for contributing sources removed (re-classified as a 1.2 feature), as described in Issue 27
  3. Cleanup of DataChannel construction, as described in Issue 60
  4. Separate proposal on simulcast/layering, as described in Issue 61
  5. Separate proposal on quality, as described in Issue 62
  6. Fix for TCP candidate type, as described in Issue 63
  7. Fix to the fingerprint attribute, as described in Issue 64
  8. Fix to RTCRtpFeatures, as described in Issue 65
  9. Support for retrieval of remote certificates, as described in Issue 67
  10. Support for ICE error handling, described in Issue 68
  11. Support for Data Channel send rate control, as described in Issue 69
  12. Support for capabilities and settings, as described in Issue 70
  13. Removal of duplicate RTCIceListener functionality, as described in Issue 71
  14. ICE gathering state added, as described in Issue 72
  15. Removed ICE role from the ICE transport constructor, as described in Issue 73

Changes since 13 February 2014

  1. Support for contributing source information added, as described in Issue 27
  2. Support for control of quality, resolution, framerate and layering added, as described in Issue 31
  3. RTCRtpListener object added and figure in Section 1 updated, as described in Issue 32
  4. More complete support for RTP and Codec Parameters added, as described in Issue 33
  5. Data Channel transport problem fixed, as described in Issue 34
  6. Various NITs fixed, as described in Issue 37
  7. RTCDtlsTransport operation and interface definition updates, as described in: Issue 38
  8. Default values of some dictionary attributes added, to partially address the issue described in: Issue 39
  9. Support for ICE TCP added, as described in Issue 41
  10. Fixed issue with sequences as attributes, as described in Issue 43
  11. Fix for issues with onlocalcandidate, as described in Issue 44
  12. Initial stab at a Stats API, as requested in Issue 46
  13. Added support for ICE gather policy, as described in Issue 47

Changes since 07 November 2013

  1. RTCTrack split into RTCRtpSender and RTCRtpReceiver objects, as proposed on 06 January 2014.
  2. RTCConnection split into RTCIceTransport and RTCDtlsTransport objects, as proposed on 09 January 2014.
  3. RTCSctpTransport object added, as described in Issue 25
  4. RTCRtpHeaderExtensionParameters added, as described in Issue 28
  5. RTCIceListener added, in order to support parallel forking, as described in Issue 29
  6. DTMF support added, as described in Issue 30