draft-ietf-rtcweb-jsep-08.txt   draft-ietf-rtcweb-jsep-09.txt 
Network Working Group J. Uberti Network Working Group J. Uberti
Internet-Draft Google Internet-Draft Google
Intended status: Standards Track C. Jennings Intended status: Standards Track C. Jennings
Expires: April 30, 2015 Cisco Expires: September 10, 2015 Cisco
E. Rescorla, Ed. E. Rescorla, Ed.
Mozilla Mozilla
October 27, 2014 March 9, 2015
Javascript Session Establishment Protocol Javascript Session Establishment Protocol
draft-ietf-rtcweb-jsep-08 draft-ietf-rtcweb-jsep-09
Abstract Abstract
This document describes the mechanisms for allowing a Javascript This document describes the mechanisms for allowing a Javascript
application to control the signaling plane of a multimedia session application to control the signaling plane of a multimedia session
via the interface specified in the W3C RTCPeerConnection API, and via the interface specified in the W3C RTCPeerConnection API, and
discusses how this relates to existing signaling protocols. discusses how this relates to existing signaling protocols.
Status of This Memo Status of This Memo
skipping to change at page 1, line 36 skipping to change at page 1, line 36
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on April 30, 2015. This Internet-Draft will expire on September 10, 2015.
Copyright Notice Copyright Notice
Copyright (c) 2014 IETF Trust and the persons identified as the Copyright (c) 2015 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
skipping to change at page 2, line 38 skipping to change at page 2, line 38
4.1.1. Constructor . . . . . . . . . . . . . . . . . . . . . 15 4.1.1. Constructor . . . . . . . . . . . . . . . . . . . . . 15
4.1.2. createOffer . . . . . . . . . . . . . . . . . . . . . 17 4.1.2. createOffer . . . . . . . . . . . . . . . . . . . . . 17
4.1.3. createAnswer . . . . . . . . . . . . . . . . . . . . 18 4.1.3. createAnswer . . . . . . . . . . . . . . . . . . . . 18
4.1.4. SessionDescriptionType . . . . . . . . . . . . . . . 19 4.1.4. SessionDescriptionType . . . . . . . . . . . . . . . 19
4.1.4.1. Use of Provisional Answers . . . . . . . . . . . 20 4.1.4.1. Use of Provisional Answers . . . . . . . . . . . 20
4.1.4.2. Rollback . . . . . . . . . . . . . . . . . . . . 20 4.1.4.2. Rollback . . . . . . . . . . . . . . . . . . . . 20
4.1.5. setLocalDescription . . . . . . . . . . . . . . . . . 21 4.1.5. setLocalDescription . . . . . . . . . . . . . . . . . 21
4.1.6. setRemoteDescription . . . . . . . . . . . . . . . . 21 4.1.6. setRemoteDescription . . . . . . . . . . . . . . . . 21
4.1.7. localDescription . . . . . . . . . . . . . . . . . . 22 4.1.7. localDescription . . . . . . . . . . . . . . . . . . 22
4.1.8. remoteDescription . . . . . . . . . . . . . . . . . . 22 4.1.8. remoteDescription . . . . . . . . . . . . . . . . . . 22
4.1.9. canTrickle . . . . . . . . . . . . . . . . . . . . . 22 4.1.9. canTrickleIceCandidates . . . . . . . . . . . . . . . 22
4.1.10. setConfiguration . . . . . . . . . . . . . . . . . . 23 4.1.10. setConfiguration . . . . . . . . . . . . . . . . . . 23
4.1.11. addIceCandidate . . . . . . . . . . . . . . . . . . . 24 4.1.11. addIceCandidate . . . . . . . . . . . . . . . . . . . 24
5. SDP Interaction Procedures . . . . . . . . . . . . . . . . . 24 5. SDP Interaction Procedures . . . . . . . . . . . . . . . . . 24
5.1. Requirements Overview . . . . . . . . . . . . . . . . . . 24 5.1. Requirements Overview . . . . . . . . . . . . . . . . . . 24
5.1.1. Implementation Requirements . . . . . . . . . . . . . 24 5.1.1. Implementation Requirements . . . . . . . . . . . . . 24
5.1.2. Usage Requirements . . . . . . . . . . . . . . . . . 26 5.1.2. Usage Requirements . . . . . . . . . . . . . . . . . 26
5.1.3. Profile Names and Interoperability . . . . . . . . . 26 5.1.3. Profile Names and Interoperability . . . . . . . . . 26
5.2. Constructing an Offer . . . . . . . . . . . . . . . . . . 27 5.2. Constructing an Offer . . . . . . . . . . . . . . . . . . 27
5.2.1. Initial Offers . . . . . . . . . . . . . . . . . . . 27 5.2.1. Initial Offers . . . . . . . . . . . . . . . . . . . 27
5.2.2. Subsequent Offers . . . . . . . . . . . . . . . . . . 32 5.2.2. Subsequent Offers . . . . . . . . . . . . . . . . . . 32
5.2.3. Options Handling . . . . . . . . . . . . . . . . . . 35 5.2.3. Options Handling . . . . . . . . . . . . . . . . . . 35
5.2.3.1. OfferToReceiveAudio . . . . . . . . . . . . . . . 35 5.2.3.1. OfferToReceiveAudio . . . . . . . . . . . . . . . 35
5.2.3.2. OfferToReceiveVideo . . . . . . . . . . . . . . . 35 5.2.3.2. OfferToReceiveVideo . . . . . . . . . . . . . . . 35
5.2.3.3. IceRestart . . . . . . . . . . . . . . . . . . . 36 5.2.3.3. IceRestart . . . . . . . . . . . . . . . . . . . 36
5.2.3.4. VoiceActivityDetection . . . . . . . . . . . . . 36 5.2.3.4. VoiceActivityDetection . . . . . . . . . . . . . 36
5.3. Generating an Answer . . . . . . . . . . . . . . . . . . 36 5.3. Generating an Answer . . . . . . . . . . . . . . . . . . 36
5.3.1. Initial Answers . . . . . . . . . . . . . . . . . . . 36 5.3.1. Initial Answers . . . . . . . . . . . . . . . . . . . 36
5.3.2. Subsequent Answers . . . . . . . . . . . . . . . . . 40 5.3.2. Subsequent Answers . . . . . . . . . . . . . . . . . 41
5.3.3. Options Handling . . . . . . . . . . . . . . . . . . 41 5.3.3. Options Handling . . . . . . . . . . . . . . . . . . 42
5.3.3.1. VoiceActivityDetection . . . . . . . . . . . . . 41 5.3.3.1. VoiceActivityDetection . . . . . . . . . . . . . 42
5.4. Parsing an Offer . . . . . . . . . . . . . . . . . . . . 41 5.4. Processing a Local Description . . . . . . . . . . . . . 42
5.5. Parsing an Answer . . . . . . . . . . . . . . . . . . . . 41 5.5. Processing a Remote Description . . . . . . . . . . . . . 43
5.6. Applying a Local Description . . . . . . . . . . . . . . 41 5.6. Parsing a Session Description . . . . . . . . . . . . . . 43
5.7. Applying a Remote Description . . . . . . . . . . . . . . 41 5.6.1. Session-Level Parsing . . . . . . . . . . . . . . . . 44
6. Configurable SDP Parameters . . . . . . . . . . . . . . . . . 41 5.6.2. Media Section Parsing . . . . . . . . . . . . . . . . 45
7. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 42 5.6.3. Semantics Verification . . . . . . . . . . . . . . . 47
7.1. Simple Example . . . . . . . . . . . . . . . . . . . . . 43 5.7. Applying a Local Description . . . . . . . . . . . . . . 47
7.2. Normal Examples . . . . . . . . . . . . . . . . . . . . . 47 5.8. Applying a Remote Description . . . . . . . . . . . . . . 48
8. Security Considerations . . . . . . . . . . . . . . . . . . . 58 5.9. Applying an Answer . . . . . . . . . . . . . . . . . . . 48
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 58 6. Configurable SDP Parameters . . . . . . . . . . . . . . . . . 48
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 58 7. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 49
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 59 7.1. Simple Example . . . . . . . . . . . . . . . . . . . . . 50
11.1. Normative References . . . . . . . . . . . . . . . . . . 59 7.2. Normal Examples . . . . . . . . . . . . . . . . . . . . . 54
11.2. Informative References . . . . . . . . . . . . . . . . . 61 8. Security Considerations . . . . . . . . . . . . . . . . . . . 65
Appendix A. Change log . . . . . . . . . . . . . . . . . . . . . 62 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 65
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 65 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 65
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 66
11.1. Normative References . . . . . . . . . . . . . . . . . . 66
11.2. Informative References . . . . . . . . . . . . . . . . . 69
Appendix A. Change log . . . . . . . . . . . . . . . . . . . . . 70
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 73
1. Introduction 1. Introduction
This document describes how the W3C WEBRTC RTCPeerConnection This document describes how the W3C WEBRTC RTCPeerConnection
interface[W3C.WD-webrtc-20140617] is used to control the setup, interface[W3C.WD-webrtc-20140617] is used to control the setup,
management and teardown of a multimedia session. management and teardown of a multimedia session.
1.1. General Design of JSEP 1.1. General Design of JSEP
The thinking behind WebRTC call setup has been to fully specify and The thinking behind WebRTC call setup has been to fully specify and
skipping to change at page 7, line 18 skipping to change at page 7, line 21
willing to receive, which, when intersected with the set of codecs willing to receive, which, when intersected with the set of codecs
the remote side supports, specifies what the remote side should send. the remote side supports, specifies what the remote side should send.
However, not all parameters follow this rule; for example, the DTLS- However, not all parameters follow this rule; for example, the DTLS-
SRTP parameters [RFC5763] sent to a remote party indicate what SRTP parameters [RFC5763] sent to a remote party indicate what
certificate the local side will use in DTLS setup, and thereby what certificate the local side will use in DTLS setup, and thereby what
the remote party should expect to receive; the remote party will have the remote party should expect to receive; the remote party will have
to accept these parameters, with no option to choose different to accept these parameters, with no option to choose different
values. values.
In addition, various RFCs put different conditions on the format of In addition, various RFCs put different conditions on the format of
offers versus answers. For example, a offer may propose an arbitrary offers versus answers. For example, an offer may propose an
number of media streams (i.e. m= sections), but an answer must arbitrary number of media streams (i.e. m= sections), but an answer
contain the exact same number as the offer. must contain the exact same number as the offer.
Lastly, while the exact media parameters are only known only after an Lastly, while the exact media parameters are only known only after an
offer and an answer have been exchanged, it is possible for the offer and an answer have been exchanged, it is possible for the
offerer to receive media after they have sent an offer and before offerer to receive media after they have sent an offer and before
they have received an answer. To properly process incoming media in they have received an answer. To properly process incoming media in
this case, the offerer's media handler must be aware of the details this case, the offerer's media handler must be aware of the details
of the offer before the answer arrives. of the offer before the answer arrives.
Therefore, in order to handle session descriptions properly, the user Therefore, in order to handle session descriptions properly, the user
agent needs: agent needs:
skipping to change at page 10, line 49 skipping to change at page 10, line 49
JSEP gathers ICE candidates as needed by the application. Collection JSEP gathers ICE candidates as needed by the application. Collection
of ICE candidates is referred to as a gathering phase, and this is of ICE candidates is referred to as a gathering phase, and this is
triggered either by the addition of a new or recycled m= line to the triggered either by the addition of a new or recycled m= line to the
local session description, or new ICE credentials in the description, local session description, or new ICE credentials in the description,
indicating an ICE restart. Use of new ICE credentials can be indicating an ICE restart. Use of new ICE credentials can be
triggered explicitly by the application, or implicitly by the browser triggered explicitly by the application, or implicitly by the browser
in response to changes in the ICE configuration. in response to changes in the ICE configuration.
When a new gathering phase starts, the ICE Agent will notify the When a new gathering phase starts, the ICE Agent will notify the
application that gathering is occurring through a callback. Then, application that gathering is occurring through an event. Then, when
when each new ICE candidate becomes available, the ICE Agent will each new ICE candidate becomes available, the ICE Agent will supply
supply it to the application via an additional callback; these it to the application via an additional event; these candidates will
candidates will also automatically be added to the local session also automatically be added to the local session description.
description. Finally, when all candidates have been gathered, a
callback will be dispatched to signal that the gathering process is Finally, when all candidates have been gathered, an event will be
complete. dispatched to signal that the gathering process is complete.
Note that gathering phases only gather the candidates needed by Note that gathering phases only gather the candidates needed by
new/recycled/restarting m= lines; other m= lines continue to use new/recycled/restarting m= lines; other m= lines continue to use
their existing candidates. their existing candidates.
3.4.2. ICE Candidate Trickling 3.4.2. ICE Candidate Trickling
Candidate trickling is a technique through which a caller may Candidate trickling is a technique through which a caller may
incrementally provide candidates to the callee after the initial incrementally provide candidates to the callee after the initial
offer has been dispatched; the semantics of "Trickle ICE" are defined offer has been dispatched; the semantics of "Trickle ICE" are defined
skipping to change at page 13, line 19 skipping to change at page 13, line 19
the app specifies the number of media streams, and thereby ICE the app specifies the number of media streams, and thereby ICE
components, for which to gather candidates. However, to accelerate components, for which to gather candidates. However, to accelerate
cases where the application knows the number of ICE components to use cases where the application knows the number of ICE components to use
ahead of time, it may ask the browser to gather a pool of potential ahead of time, it may ask the browser to gather a pool of potential
ICE candidates to help ensure rapid media setup. ICE candidates to help ensure rapid media setup.
When setLocalDescription is eventually called, and the browser goes When setLocalDescription is eventually called, and the browser goes
to gather the needed ICE candidates, it SHOULD start by checking if to gather the needed ICE candidates, it SHOULD start by checking if
any candidates are available in the pool. If there are candidates in any candidates are available in the pool. If there are candidates in
the pool, they SHOULD be handed to the application immediately via the pool, they SHOULD be handed to the application immediately via
the ICE candidate callback. If the pool becomes depleted, either the ICE candidate event. If the pool becomes depleted, either
because a larger-than-expected number of ICE components is used, or because a larger-than-expected number of ICE components is used, or
because the pool has not had enough time to gather candidates, the because the pool has not had enough time to gather candidates, the
remaining candidates are gathered as usual. remaining candidates are gathered as usual.
One example of where this concept is useful is an application that One example of where this concept is useful is an application that
expects an incoming call at some point in the future, and wants to expects an incoming call at some point in the future, and wants to
minimize the time it takes to establish connectivity, to avoid minimize the time it takes to establish connectivity, to avoid
clipping of initial media. By pre-gathering candidates into the clipping of initial media. By pre-gathering candidates into the
pool, it can exchange and start sending connectivity checks from pool, it can exchange and start sending connectivity checks from
these candidates almost immediately upon receipt of a call. Note these candidates almost immediately upon receipt of a call. Note
skipping to change at page 16, line 22 skipping to change at page 16, line 22
candidate policy MUST be set to allow all candidates, as this candidate policy MUST be set to allow all candidates, as this
minimizes use of application STUN/TURN server resources. minimizes use of application STUN/TURN server resources.
If a size is specified for the ICE candidate pool, this indicates the If a size is specified for the ICE candidate pool, this indicates the
number of ICE components to pre-gather candidates for. Because pre- number of ICE components to pre-gather candidates for. Because pre-
gathering results in utilizing STUN/TURN server resources for gathering results in utilizing STUN/TURN server resources for
potentially long periods of time, this must only occur upon potentially long periods of time, this must only occur upon
application request, and therefore the default candidate pool size application request, and therefore the default candidate pool size
MUST be zero. MUST be zero.
Lastly, the application can specify its preferred policy regarding The application can specify its preferred policy regarding use of
use of BUNDLE, the multiplexing mechanism defined in BUNDLE, the multiplexing mechanism defined in
[I-D.ietf-mmusic-sdp-bundle-negotiation]. By specifying a policy [I-D.ietf-mmusic-sdp-bundle-negotiation]. By specifying a policy
from the list below, the application can control how aggressively it from the list below, the application can control how aggressively it
will try to BUNDLE media streams together. The set of available will try to BUNDLE media streams together. The set of available
policies is as follows: policies is as follows:
balanced: The application will BUNDLE all media streams of the same balanced: The application will BUNDLE all media streams of the same
type together. That is, if there are multiple audio and multiple type together. That is, if there are multiple audio and multiple
video MediaStreamTracks attached to a PeerConnection, all but the video MediaStreamTracks attached to a PeerConnection, all but the
first audio and video tracks will be marked as bundle-only, and first audio and video tracks will be marked as bundle-only, and
candidates will only be gathered for N media streams, where N is candidates will only be gathered for N media streams, where N is
skipping to change at page 17, line 7 skipping to change at page 17, line 7
streams as bundle-only. This policy will allow all streams to be streams as bundle-only. This policy will allow all streams to be
received by non-BUNDLE-aware endpoints, but require separate received by non-BUNDLE-aware endpoints, but require separate
candidates to be gathered for each media stream. candidates to be gathered for each media stream.
max-bundle: The application will BUNDLE all of its media streams, max-bundle: The application will BUNDLE all of its media streams,
including data channels, on a single transport. All streams other including data channels, on a single transport. All streams other
than the first will be marked as bundle-only. This policy aims to than the first will be marked as bundle-only. This policy aims to
minimize candidate gathering and maximize multiplexing, at the minimize candidate gathering and maximize multiplexing, at the
cost of less compatibility with legacy endpoints. cost of less compatibility with legacy endpoints.
max-bundle-and-rtcp-mux: Similar to max-bundle, but RTCP candidates
are not gathered. This policy reduces the candidates that must be
gathered to the absolute minimum, but will not be compatible with
legacy endpoints that do not support RTCP mux.
As it provides the best tradeoff between performance and As it provides the best tradeoff between performance and
compatibility with legacy endpoints, the default BUNDLE policy MUST compatibility with legacy endpoints, the default BUNDLE policy MUST
be set to "balanced". be set to "balanced".
The application can specify its preferred policy regarding use of
RTP/RTCP multiplexing [RFC5761] using one of the following policies:
negotiate: The browser will gather both RTP and RTCP candidates but
also will offer "a=rtcp-mux", thus allowing for compatibility with
either multiplexing or non-multiplexing endpoints.
require: The browser will only gather RTP candidates. [[OPEN ISSUE:
how should the answerer behave. https://github.com/rtcweb-
wg/jsep/issues/114]] This halves the number of candidates that the
offerer needs to gather.
4.1.2. createOffer 4.1.2. createOffer
The createOffer method generates a blob of SDP that contains a The createOffer method generates a blob of SDP that contains a
[RFC3264] offer with the supported configurations for the session, [RFC3264] offer with the supported configurations for the session,
including descriptions of the local MediaStreams attached to this including descriptions of the local MediaStreams attached to this
PeerConnection, the codec/RTP/RTCP options supported by this PeerConnection, the codec/RTP/RTCP options supported by this
implementation, and any candidates that have been gathered by the ICE implementation, and any candidates that have been gathered by the ICE
Agent. An options parameter may be supplied to provide additional Agent. An options parameter may be supplied to provide additional
control over the generated offer. This options parameter should control over the generated offer. This options parameter should
allow for the following manipulations to be performed: allow for the following manipulations to be performed:
skipping to change at page 22, line 27 skipping to change at page 22, line 27
The localDescription method returns a copy of the current local The localDescription method returns a copy of the current local
configuration, i.e. what was most recently passed to configuration, i.e. what was most recently passed to
setLocalDescription, plus any local candidates that have been setLocalDescription, plus any local candidates that have been
generated by the ICE Agent. generated by the ICE Agent.
[[OPEN ISSUE: Do we need to expose accessors for both the current and [[OPEN ISSUE: Do we need to expose accessors for both the current and
proposed local description? https://github.com/rtcweb-wg/jsep/ proposed local description? https://github.com/rtcweb-wg/jsep/
issues/16]] issues/16]]
A null object will be returned if the local description has not yet A null object will be returned if the local description has not yet
been established, or if the PeerConnection has been closed. been established.
4.1.8. remoteDescription 4.1.8. remoteDescription
The remoteDescription method returns a copy of the current remote The remoteDescription method returns a copy of the current remote
configuration, i.e. what was most recently passed to configuration, i.e. what was most recently passed to
setRemoteDescription, plus any remote candidates that have been setRemoteDescription, plus any remote candidates that have been
supplied via processIceMessage. supplied via processIceMessage.
[[OPEN ISSUE: Do we need to expose accessors for both the current and [[OPEN ISSUE: Do we need to expose accessors for both the current and
proposed remote description? https://github.com/rtcweb-wg/jsep/ proposed remote description? https://github.com/rtcweb-wg/jsep/
issues/16]] issues/16]]
A null object will be returned if the remote description has not yet A null object will be returned if the remote description has not yet
been established, or if the PeerConnection has been closed. been established.
4.1.9. canTrickle 4.1.9. canTrickleIceCandidates
[[TODO: Revise if the W3C API uses different stuff here.]] The The canTrickleIceCandidates property indicates whether the remote
canTrickle property indicates whether the remote side supports side supports receiving trickled candidates. There are three
receiving trickled candidates. There are three potential values: potential values:
null: No SDP has been received from the other side, so it is not null: No SDP has been received from the other side, so it is not
known if it can handle trickle. This is the initial value before known if it can handle trickle. This is the initial value before
setRemoteDescription() is called. setRemoteDescription() is called.
true: SDP has been received from the other side indicating that it true: SDP has been received from the other side indicating that it
can support trickle. can support trickle.
false: SDP has been received from the other side indicating that it false: SDP has been received from the other side indicating that it
cannot support trickle. cannot support trickle.
As described in Section 3.4.2, JSEP implementations always provide As described in Section 3.4.2, JSEP implementations always provide
candidates to the application individually, consistent with what is candidates to the application individually, consistent with what is
needed for Trickle ICE. However, applications can use the canTrickle needed for Trickle ICE. However, applications can use the
property to determine whether they can actually do Trickle ICE, i.e. canTrickleIceCandidates property to determine whether their peer can
safely send an initial offer or answer followed later by candidates actually do Trickle ICE, i.e., whether it is safe to send an initial
as they are gathered. As "true" is the only value that definitively offer or answer followed later by candidates as they are gathered.
indicates remote Trickle ICE support, an application which compares As "true" is the only value that definitively indicates remote
canTrickle against "true" will by default attempt Half Trickle on Trickle ICE support, an application which compares
initial offers and Full Trickle on subsequent interactions with a canTrickleIceCandidates against "true" will by default attempt Half
Trickle ICE-compatible agent. Trickle on initial offers and Full Trickle on subsequent interactions
with a Trickle ICE-compatible agent.
4.1.10. setConfiguration 4.1.10. setConfiguration
The setConfiguration method allows the global configuration of the The setConfiguration method allows the global configuration of the
PeerConnection, which was initially set by constructor parameters, to PeerConnection, which was initially set by constructor parameters, to
be changed during the session. The effects of this method call be changed during the session. The effects of this method call
depend on when it is invoked, and differ depending on which specific depend on when it is invoked, and differ depending on which specific
parameters are changed: parameters are changed:
o Any changes to the STUN/TURN servers to use affect the next o Any changes to the STUN/TURN servers to use affect the next
skipping to change at page 24, line 5 skipping to change at page 24, line 5
described above. Note though that changes to the policy have no described above. Note though that changes to the policy have no
effect on the candidate pool, because pooled candidates are not effect on the candidate pool, because pooled candidates are not
surfaced to the application until a gathering phase occurs, and so surfaced to the application until a gathering phase occurs, and so
any necessary filtering can still be done on any pooled any necessary filtering can still be done on any pooled
candidates. candidates.
o Any changes to the ICE candidate pool size take effect o Any changes to the ICE candidate pool size take effect
immediately; if increased, additional candidates are pre-gathered; immediately; if increased, additional candidates are pre-gathered;
if decreased, the now-superfluous candidates are discarded. if decreased, the now-superfluous candidates are discarded.
o Any changes to the BUNDLE policy take effect immediately, i.e. o The BUNDLE and RTCP-multiplexing policies MUST NOT be changed
any future tracks added to the PeerConnection will have their after the construction of the PeerConnection.
bundle-only state marked accordingly.
This call may result in a change to the state of the ICE Agent, and This call may result in a change to the state of the ICE Agent, and
may result in a change to media state if it results in connectivity may result in a change to media state if it results in connectivity
being established. being established.
4.1.11. addIceCandidate 4.1.11. addIceCandidate
The addIceCandidate method provides a remote candidate to the ICE The addIceCandidate method provides a remote candidate to the ICE
Agent, which, if parsed successfully, will be added to the remote Agent, which, if parsed successfully, will be added to the remote
description according to the rules defined for Trickle ICE. description according to the rules defined for Trickle ICE.
skipping to change at page 25, line 6 skipping to change at page 24, line 51
5.1.1. Implementation Requirements 5.1.1. Implementation Requirements
This list of mandatory-to-implement specifications is derived from This list of mandatory-to-implement specifications is derived from
the requirements outlined in [I-D.ietf-rtcweb-rtp-usage]. the requirements outlined in [I-D.ietf-rtcweb-rtp-usage].
R-1 [RFC4566] is the base SDP specification and MUST be R-1 [RFC4566] is the base SDP specification and MUST be
implemented. implemented.
R-2 [RFC5764] MUST be supported for signaling the UDP/TLS/RTP/SAVPF R-2 [RFC5764] MUST be supported for signaling the UDP/TLS/RTP/SAVPF
[RFC5764] and TCP/TLS/RTP/SAVPF [RFC5764] and TCP/DTLS/RTP/SAVPF
[I-D.nandakumar-mmusic-proto-iana-registration] RTP profiles. [I-D.nandakumar-mmusic-proto-iana-registration] RTP profiles.
R-3 [RFC5245] MUST be implemented for signaling the ICE credentials R-3 [RFC5245] MUST be implemented for signaling the ICE credentials
and candidate lines corresponding to each media stream. The and candidate lines corresponding to each media stream. The
ICE implementation MUST be a Full implementation, not a Lite ICE implementation MUST be a Full implementation, not a Lite
implementation. implementation.
R-4 [RFC5763] MUST be implemented to signal DTLS certificate R-4 [RFC5763] MUST be implemented to signal DTLS certificate
fingerprints. fingerprints.
skipping to change at page 25, line 37 skipping to change at page 25, line 33
R-8 The bundle mechanism in R-8 The bundle mechanism in
[I-D.ietf-mmusic-sdp-bundle-negotiation] MUST be supported to [I-D.ietf-mmusic-sdp-bundle-negotiation] MUST be supported to
signal the ability to multiplex RTP streams on a single UDP signal the ability to multiplex RTP streams on a single UDP
port, in order to avoid excessive use of port number resources. port, in order to avoid excessive use of port number resources.
R-9 The SDP attributes of "sendonly", "recvonly", "inactive", and R-9 The SDP attributes of "sendonly", "recvonly", "inactive", and
"sendrecv" from [RFC4566] MUST be implemented to signal "sendrecv" from [RFC4566] MUST be implemented to signal
information about media direction. information about media direction.
R-10 [RFC5576] MUST be implemented to signal RTP SSRC values. R-10 [RFC5576] MUST be implemented to signal RTP SSRC values and
grouping semantics.
R-11 [RFC4585] MUST be implemented to signal RTCP based feedback. R-11 [RFC4585] MUST be implemented to signal RTCP based feedback.
R-12 [RFC5761] MUST be implemented to signal multiplexing of RTP and R-12 [RFC5761] MUST be implemented to signal multiplexing of RTP and
RTCP. RTCP.
R-13 [RFC5506] MUST be implemented to signal reduced-size RTCP R-13 [RFC5506] MUST be implemented to signal reduced-size RTCP
messages. messages.
R-14 [RFC3556] with bandwidth modifiers MAY be supported for R-14 [RFC4588] MUST be implemented to signal RTX payload type
associations.
R-15 [RFC3556] with bandwidth modifiers MAY be supported for
specifying RTCP bandwidth as a fraction of the media bandwidth, specifying RTCP bandwidth as a fraction of the media bandwidth,
RTCP fraction allocated to the senders and setting maximum RTCP fraction allocated to the senders and setting maximum
media bit-rate boundaries. media bit-rate boundaries.
R-16 TODO: any others?
As required by [RFC4566], Section 5.13, JSEP implementations MUST As required by [RFC4566], Section 5.13, JSEP implementations MUST
ignore unknown attribute (a=) lines. ignore unknown attribute (a=) lines.
5.1.2. Usage Requirements 5.1.2. Usage Requirements
All session descriptions handled by JSEP endpoints, both local and All session descriptions handled by JSEP endpoints, both local and
remote, MUST indicate support for the following specifications. If remote, MUST indicate support for the following specifications. If
any of these are absent, this omission MUST be treated as an error. any of these are absent, this omission MUST be treated as an error.
R-1 ICE, as specified in [RFC5245], MUST be used. Note that the R-1 ICE, as specified in [RFC5245], MUST be used. Note that the
remote endpoint may use a Lite implementation; implementations remote endpoint may use a Lite implementation; implementations
MUST properly handle remote endpoints which do ICE-Lite. MUST properly handle remote endpoints which do ICE-Lite.
R-2 DTLS-SRTP, as specified in [RFC5763], MUST be used. R-2 DTLS [RFC6347] or DTLS-SRTP [RFC5763], MUST be used, as
appropriate for the media type, as specified in
[I-D.ietf-rtcweb-security-arch]
5.1.3. Profile Names and Interoperability 5.1.3. Profile Names and Interoperability
For media m= sections, JSEP endpoints MUST support both the "UDP/TLS/ For media m= sections, JSEP endpoints MUST support both the "UDP/TLS/
RTP/SAVPF" and "TCP/TLS/RTP/SAVPF" profiles and MUST indicate one of RTP/SAVPF" and "TCP/DTLS/RTP/SAVPF" profiles and MUST indicate one of
these two profiles for each media m= line they produce in an offer. these two profiles for each media m= line they produce in an offer.
For data m= sections, JSEP endpoints must support both the "UDP/TLS/ For data m= sections, JSEP endpoints must support both the "UDP/DTLS/
SCTP" and "TCP/TLS/SCTP" profiles and MUST indicate one of these two SCTP" and "TCP/DTLS/SCTP" profiles and MUST indicate one of these two
profiles for each data m= line they produce in an offer. Because ICE profiles for each data m= line they produce in an offer. Because ICE
can select either TCP or UDP transport depending on network can select either TCP or UDP transport depending on network
conditions, both advertisements are consistent with ICE eventually conditions, both advertisements are consistent with ICE eventually
selecting either either UDP or TCP. selecting either either UDP or TCP.
Unfortunately, in an attempt at compatibility, some endpoints Unfortunately, in an attempt at compatibility, some endpoints
generate other profile strings even when they mean to support one of generate other profile strings even when they mean to support one of
these profiles. For instance, an endpoint might generate "RTP/AVP" these profiles. For instance, an endpoint might generate "RTP/AVP"
but supply "a=fingerprint" and "a=rtcp-fb" attributes, indicating its but supply "a=fingerprint" and "a=rtcp-fb" attributes, indicating its
willingness to support "(UDP,TCP)/TLS/RTP/SAVPF". In order to willingness to support "(UDP,TCP)/TLS/RTP/SAVPF". In order to
skipping to change at page 27, line 12 skipping to change at page 27, line 12
"a=fingerprint" attribute. Note that lack of an "a=fingerprint" "a=fingerprint" attribute. Note that lack of an "a=fingerprint"
attribute will lead to negotiation failure. attribute will lead to negotiation failure.
o The use of AVPF or AVP simply controls the timing rules used for o The use of AVPF or AVP simply controls the timing rules used for
RTCP feedback. If AVPF is provided, or an "a=rtcp-fb" attribute RTCP feedback. If AVPF is provided, or an "a=rtcp-fb" attribute
is present, assume AVPF timing, i.e. a default value of "trr- is present, assume AVPF timing, i.e. a default value of "trr-
int=0". Otherwise, assume that AVPF is being used in an AVP int=0". Otherwise, assume that AVPF is being used in an AVP
compatible mode and use AVP timing, i.e., "trr-int=4". compatible mode and use AVP timing, i.e., "trr-int=4".
o For data m= sections, JSEP endpoints MUST support receiving the o For data m= sections, JSEP endpoints MUST support receiving the
"UDP/ TLS/SCTP", "TCP/TLS/SCTP", or "DTLS/SCTP" (for backwards "UDP/ DTLS/SCTP", "TCP/DTLS/SCTP", or "DTLS/SCTP" (for backwards
compatibility) profiles. compatibility) profiles.
Note that re-offers by JSEP endpoints MUST use the correct profile Note that re-offers by JSEP endpoints MUST use the correct profile
strings even if the initial offer/answer exchange used an (incorrect) strings even if the initial offer/answer exchange used an (incorrect)
older profile string. older profile string.
5.2. Constructing an Offer 5.2. Constructing an Offer
When createOffer is called, a new SDP description must be created When createOffer is called, a new SDP description must be created
that includes the functionality specified in that includes the functionality specified in
skipping to change at page 29, line 16 skipping to change at page 29, line 16
Section 5.14. For the m= line itself, the following rules MUST be Section 5.14. For the m= line itself, the following rules MUST be
followed: followed:
o The port value is set to the port of the default ICE candidate for o The port value is set to the port of the default ICE candidate for
this m= section, but given that no candidates have yet been this m= section, but given that no candidates have yet been
gathered, the "dummy" port value of 9 (Discard) MUST be used, as gathered, the "dummy" port value of 9 (Discard) MUST be used, as
indicated in [I-D.ietf-mmusic-trickle-ice], Section 5.1. indicated in [I-D.ietf-mmusic-trickle-ice], Section 5.1.
o To properly indicate use of DTLS, the <proto> field MUST be set to o To properly indicate use of DTLS, the <proto> field MUST be set to
"UDP/TLS/RTP/SAVPF", as specified in [RFC5764], Section 8, if the "UDP/TLS/RTP/SAVPF", as specified in [RFC5764], Section 8, if the
default candidate uses UDP transport, or "TCP/TLS/RTP/SAVPF", as default candidate uses UDP transport, or "TCP/DTLS/RTP/SAVPF", as
specified in[I-D.nandakumar-mmusic-proto-iana-registration] if the specified in[I-D.nandakumar-mmusic-proto-iana-registration] if the
default candidate uses TCP transport. default candidate uses TCP transport.
The m= line MUST be followed immediately by a "c=" line, as specified The m= line MUST be followed immediately by a "c=" line, as specified
in [RFC4566], Section 5.7. Again, as no candidates have yet been in [RFC4566], Section 5.7. Again, as no candidates have yet been
gathered, the "c=" line must contain the "dummy" value "IN IP6 ::", gathered, the "c=" line must contain the "dummy" value "IN IP6 ::",
as defined in [I-D.ietf-mmusic-trickle-ice], Section 5.1. as defined in [I-D.ietf-mmusic-trickle-ice], Section 5.1.
Each m= section MUST include the following attribute lines: Each m= section MUST include the following attribute lines:
skipping to change at page 29, line 43 skipping to change at page 29, line 43
o An "a=rtcp" line, as specified in [RFC3605], Section 2.1, o An "a=rtcp" line, as specified in [RFC3605], Section 2.1,
containing the dummy value "9 IN IP6 ::", because no candidates containing the dummy value "9 IN IP6 ::", because no candidates
have yet been gathered. have yet been gathered.
o An "a=msid" line, as specified in [I-D.ietf-mmusic-msid], o An "a=msid" line, as specified in [I-D.ietf-mmusic-msid],
Section 2. Section 2.
o An "a=sendrecv" line, as specified in [RFC3264], Section 5.1. o An "a=sendrecv" line, as specified in [RFC3264], Section 5.1.
o For each supported codec, "a=rtpmap" and "a=fmtp" lines, as o For each supported codec, "a=rtpmap" and "a=fmtp" lines, as
specified in [RFC4566], Section 6. For audio, the codecs specified in [RFC4566], Section 6. The audio and video codecs
specified in [I-D.ietf-rtcweb-audio], Section 3, MUST be be that MUST be supported are specified in [I-D.ietf-rtcweb-audio]
supported. (see Section 3) and [I-D.ietf-rtcweb-video] (see Section 5).
o If this m= section is for media with configurable frame sizes, o If this m= section is for media with configurable frame sizes,
e.g. audio, an "a=maxptime" line, indicating the smallest of the e.g. audio, an "a=maxptime" line, indicating the smallest of the
maximum supported frame sizes out of all codecs included above, as maximum supported frame sizes out of all codecs included above, as
specified in [RFC4566], Section 6. specified in [RFC4566], Section 6.
o For each primary codec where RTP retransmission should be used, a o For each primary codec where RTP retransmission should be used, a
corresponding "a=rtpmap" line indicating "rtx" with the clock rate corresponding "a=rtpmap" line indicating "rtx" with the clock rate
of the primary codec and an "a=fmtp" line that references the of the primary codec and an "a=fmtp" line that references the
payload type of the primary codec, as specified in [RFC4588], payload type of the primary codec, as specified in [RFC4588],
Section 8.1. Section 8.1.
o For each supported FEC mechanism, a corresponding "a=rtpmap" line o For each supported FEC mechanism, "a=rtpmap" and "a=fmtp" lines,
indicating the desired FEC codec. as specified in [RFC4566], Section 6. The FEC mechanisms that
MUST be supported are specified in [I-D.ietf-rtcweb-fec],
Section 6, and specific usage for each media type is outlined in
Sections 4 and 5.
o "a=ice-ufrag" and "a=ice-passwd" lines, as specified in [RFC5245], o "a=ice-ufrag" and "a=ice-passwd" lines, as specified in [RFC5245],
Section 15.4. Section 15.4.
o An "a=ice-options" line, with the "trickle" option, as specified o An "a=ice-options" line, with the "trickle" option, as specified
in [I-D.ietf-mmusic-trickle-ice], Section 4. in [I-D.ietf-mmusic-trickle-ice], Section 4.
o An "a=fingerprint" line, as specified in [RFC4572], Section 5; the o An "a=fingerprint" line, as specified in [RFC4572], Section 5; the
algorithm used for the fingerprint MUST match that used in the algorithm used for the fingerprint MUST match that used in the
certificate signature. certificate signature.
skipping to change at page 30, line 35 skipping to change at page 30, line 38
clarified for use in DTLS-SRTP scenarios in [RFC5763], Section 5. clarified for use in DTLS-SRTP scenarios in [RFC5763], Section 5.
The role value in the offer MUST be "actpass". The role value in the offer MUST be "actpass".
o An "a=rtcp-mux" line, as specified in [RFC5761], Section 5.1.1. o An "a=rtcp-mux" line, as specified in [RFC5761], Section 5.1.1.
o An "a=rtcp-rsize" line, as specified in [RFC5506], Section 5. o An "a=rtcp-rsize" line, as specified in [RFC5506], Section 5.
o For each supported RTP header extension, an "a=extmap" line, as o For each supported RTP header extension, an "a=extmap" line, as
specified in [RFC5285], Section 5. The list of header extensions specified in [RFC5285], Section 5. The list of header extensions
that SHOULD/MUST be supported is specified in that SHOULD/MUST be supported is specified in
[I-D.ietf-rtcweb-rtp-usage], Section 5.2. [TODO: ensure that [I-D.ietf-rtcweb-rtp-usage], Section 5.2. Any header extensions
urn:ietf:params:rtp-hdrext:sdes:mid appears either there or here] that require encryption MUST be specified as indicated in
Any header extensions that require encryption MUST be specified as [RFC6904], Section 4.
indicated in [RFC6904], Section 4.
o For each supported RTCP feedback mechanism, an "a=rtcp-fb" o For each supported RTCP feedback mechanism, an "a=rtcp-fb"
mechanism, as specified in [RFC4585], Section 4.2. The list of mechanism, as specified in [RFC4585], Section 4.2. The list of
RTCP feedback mechanisms that SHOULD/MUST be supported is RTCP feedback mechanisms that SHOULD/MUST be supported is
specified in [I-D.ietf-rtcweb-rtp-usage], Section 5.1. specified in [I-D.ietf-rtcweb-rtp-usage], Section 5.1.
o An "a=ssrc" line, as specified in [RFC5576], Section 4.1, o An "a=ssrc" line, as specified in [RFC5576], Section 4.1,
indicating the SSRC to be used for sending media, along with the indicating the SSRC to be used for sending media, along with the
mandatory "cname" source attribute, as specified in Section 6.1, mandatory "cname" source attribute, as specified in Section 6.1,
indicating the CNAME for the source. The CNAME must be generated indicating the CNAME for the source. The CNAME must be generated
skipping to change at page 31, line 11 skipping to change at page 31, line 13
specified for MSTs? Are they randomly generated for each specified for MSTs? Are they randomly generated for each
MediaStream? If so, can two MediaStreams be synced? See: MediaStream? If so, can two MediaStreams be synced? See:
https://github.com/rtcweb-wg/jsep/issues/4] https://github.com/rtcweb-wg/jsep/issues/4]
o If RTX is supported for this media type, another "a=ssrc" line o If RTX is supported for this media type, another "a=ssrc" line
with the RTX SSRC, and an "a=ssrc-group" line, as specified in with the RTX SSRC, and an "a=ssrc-group" line, as specified in
[RFC5576], section 4.2, with semantics set to "FID" and including [RFC5576], section 4.2, with semantics set to "FID" and including
the primary and RTX SSRCs. the primary and RTX SSRCs.
o If FEC is supported for this media type, another "a=ssrc" line o If FEC is supported for this media type, another "a=ssrc" line
with the FEC SSRC, and an "a=ssrc-group" line, as specified in with the FEC SSRC, and an "a=ssrc-group" line with semantics set
[RFC5576], section 4.2, with semantics set to "FEC" and including to "FEC-FR" and including the primary and FEC SSRCs, as specified
the primary and FEC SSRCs. in [RFC5956], section 4.3. For simplicity, if both RTX and FEC
are supported, the FEC SSRC MUST be the same as the RTX SSRC.
o [OPEN ISSUE: Handling of a=imageattr] o [OPEN ISSUE: Handling of a=imageattr]
o If the BUNDLE policy for this PeerConnection is set to "max- o If the BUNDLE policy for this PeerConnection is set to "max-
bundle", and this is not the first m= section, or the BUNDLE bundle", and this is not the first m= section, or the BUNDLE
policy is set to "balanced", and this is not the first m= section policy is set to "balanced", and this is not the first m= section
for this media type, an "a=bundle-only" line. for this media type, an "a=bundle-only" line.
Lastly, if a data channel has been created, a m= section MUST be Lastly, if a data channel has been created, a m= section MUST be
generated for data. The <media> field MUST be set to "application" generated for data. The <media> field MUST be set to "application"
and the <proto> field MUST be set to "UDP/TLS/SCTP" if the default and the <proto> field MUST be set to "UDP/DTLS/SCTP" if the default
candidate uses UDP transport, or "TCP/TLS/SCTP" if the default candidate uses UDP transport, or "TCP/DTLS/SCTP" if the default
candidate uses TCP transport [I-D.ietf-mmusic-sctp-sdp]. The "fmt" candidate uses TCP transport [I-D.ietf-mmusic-sctp-sdp]. The "fmt"
value MUST be set to the SCTP port number, as specified in value MUST be set to the SCTP port number, as specified in
Section 4.1. [TODO: update this to use a=sctp-port, as indicated in Section 4.1. [TODO: update this to use a=sctp-port, as indicated in
the latest data channel docs] the latest data channel docs]
Within the data m= section, the "a=mid", "a=ice-ufrag", "a=ice- Within the data m= section, the "a=mid", "a=ice-ufrag", "a=ice-
passwd", "a=ice-options", "a=candidate", "a=fingerprint", and passwd", "a=ice-options", "a=candidate", "a=fingerprint", and
"a=setup" lines MUST be included as mentioned above, along with an "a=setup" lines MUST be included as mentioned above, along with an
"a=sctpmap" line referencing the SCTP port number and specifying the "a=sctpmap" line referencing the SCTP port number and specifying the
application protocol indicated in [I-D.ietf-rtcweb-data-protocol]. application protocol indicated in [I-D.ietf-rtcweb-data-protocol].
skipping to change at page 32, line 46 skipping to change at page 32, line 49
candidates. candidates.
If the initial offer was applied using setLocalDescription, but an If the initial offer was applied using setLocalDescription, but an
answer from the remote side has not yet been applied, meaning the answer from the remote side has not yet been applied, meaning the
PeerConnection is still in the "local-offer" state, an offer is PeerConnection is still in the "local-offer" state, an offer is
generated by following the steps in the "stable" state above, along generated by following the steps in the "stable" state above, along
with these exceptions: with these exceptions:
o The "s=" and "t=" lines MUST stay the same. o The "s=" and "t=" lines MUST stay the same.
o Each "m=" and c=" line MUST be filled in with the port and address o Each "m=" and c=" line MUST be filled in with the port, protocol,
of the default candidate for the m= section, as described in and address of the default candidate for the m= section, as
[RFC5245], Section 4.3. Each "a=rtcp" attribute line MUST also be described in [RFC5245], Section 4.3. Each "a=rtcp" attribute line
filled in with the port and address of the appropriate default MUST also be filled in with the port and address of the
candidate, either the default RTP or RTCP candidate, depending on appropriate default candidate, either the default RTP or RTCP
whether RTCP multiplexing is currently active or not. Note that candidate, depending on whether RTCP multiplexing is currently
if RTCP multiplexing is being offered, but not yet active, the active or not. Note that if RTCP multiplexing is being offered,
default RTCP candidate MUST be used, as indicated in [RFC5761], but not yet active, the default RTCP candidate MUST be used, as
section 5.1.3. In each case, if no candidates of the desired type indicated in [RFC5761], section 5.1.3. In each case, if no
have yet been gathered, dummy values MUST be used, as described candidates of the desired type have yet been gathered, dummy
above. [TODO: update profile UDP/TCP per default candidate] values MUST be used, as described above.
o Each "a=mid" line MUST stay the same. o Each "a=mid" line MUST stay the same.
o Each "a=ice-ufrag" and "a=ice-pwd" line MUST stay the same, unless o Each "a=ice-ufrag" and "a=ice-pwd" line MUST stay the same, unless
the ICE configuration has changed (either changes to the supported the ICE configuration has changed (either changes to the supported
STUN/TURN servers, or the ICE candidate policy), or the STUN/TURN servers, or the ICE candidate policy), or the
"IceRestart" option (Section 5.2.3.3 was specified. "IceRestart" option (Section 5.2.3.3 was specified.
o Within each m= section, for each candidate that has been gathered o Within each m= section, for each candidate that has been gathered
during the most recent gathering phase (see Section 3.4.1), an during the most recent gathering phase (see Section 3.4.1), an
skipping to change at page 35, line 9 skipping to change at page 35, line 9
specified in the BUNDLE group in the most recent answer, minus any m= specified in the BUNDLE group in the most recent answer, minus any m=
sections that have been marked as rejected, plus any newly added or sections that have been marked as rejected, plus any newly added or
re-enabled m= sections. In other words, the BUNDLE attribute must re-enabled m= sections. In other words, the BUNDLE attribute must
contain all m= sections that were previously bundled, as long as they contain all m= sections that were previously bundled, as long as they
are still alive, as well as any new m= sections. are still alive, as well as any new m= sections.
5.2.3. Options Handling 5.2.3. Options Handling
The createOffer method takes as a parameter an RTCOfferOptions The createOffer method takes as a parameter an RTCOfferOptions
object. Special processing is performed when generating a SDP object. Special processing is performed when generating a SDP
description if the following constraints are present. description if the following options are present.
5.2.3.1. OfferToReceiveAudio 5.2.3.1. OfferToReceiveAudio
If the "OfferToReceiveAudio" option is specified, with an integer If the "OfferToReceiveAudio" option is specified, with an integer
value of N, and M audio MediaStreamTracks have been added to the value of N, and M audio MediaStreamTracks have been added to the
PeerConnection, the offer MUST include N non-rejected m= sections PeerConnection, the offer MUST include N non-rejected m= sections
with media type "audio", even if N is greater than M. This allows with media type "audio", even if N is greater than M. This allows
the offerer to receive audio, including multiple independent streams, the offerer to receive audio, including multiple independent streams,
even when not sending it; accordingly, the directional attribute on even when not sending it; accordingly, the directional attribute on
the N-M audio m= sections without associated MediaStreamTracks MUST the N-M audio m= sections without associated MediaStreamTracks MUST
skipping to change at page 38, line 44 skipping to change at page 38, line 44
there is a local MediaStreamTrack that has been associated, the there is a local MediaStreamTrack that has been associated, the
directionality MUST be set as sendrecv. If the offer was directionality MUST be set as sendrecv. If the offer was
sendonly, and the remote MediaStreamTrack is still "live", the sendonly, and the remote MediaStreamTrack is still "live", the
directionality MUST be set as recvonly. If the offer was directionality MUST be set as recvonly. If the offer was
recvonly, and a local MediaStreamTrack has been associated, the recvonly, and a local MediaStreamTrack has been associated, the
directionality MUST be set as sendonly. If the offer was directionality MUST be set as sendonly. If the offer was
inactive, the directionality MUST be set as inactive. inactive, the directionality MUST be set as inactive.
o For each supported codec that is present in the offer, "a=rtpmap" o For each supported codec that is present in the offer, "a=rtpmap"
and "a=fmtp" lines, as specified in [RFC4566], Section 6, and and "a=fmtp" lines, as specified in [RFC4566], Section 6, and
[RFC3264], Section 6.1. For audio, the codecs specified in [RFC3264], Section 6.1. The audio and video codecs that MUST be
[I-D.ietf-rtcweb-audio], Section 3, MUST be supported. Note that supported are specified in [I-D.ietf-rtcweb-audio] (see Section 3)
for simplicity, the answerer MAY use different payload types for and [I-D.ietf-rtcweb-video] (see Section 5). Note that for
simplicity, the answerer MAY use different payload types for
codecs than the offerer, as it is not prohibited by Section 6.1. codecs than the offerer, as it is not prohibited by Section 6.1.
o If this m= section is for media with configurable frame sizes, o If this m= section is for media with configurable frame sizes,
e.g. audio, an "a=maxptime" line, indicating the smallest of the e.g. audio, an "a=maxptime" line, indicating the smallest of the
maximum supported frame sizes out of all codecs included above, as maximum supported frame sizes out of all codecs included above, as
specified in [RFC4566], Section 6. specified in [RFC4566], Section 6.
o If "rtx" is present in the offer, for each primary codec where RTP o If "rtx" is present in the offer, for each primary codec where RTP
retransmission should be used, a corresponding "a=rtpmap" line retransmission should be used, a corresponding "a=rtpmap" line
indicating "rtx" with the clock rate of the primary codec and an indicating "rtx" with the clock rate of the primary codec and an
"a=fmtp" line that references the payload type of the primary "a=fmtp" line that references the payload type of the primary
codec, as specified in [RFC4588], Section 8.1. codec, as specified in [RFC4588], Section 8.1.
o For each supported FEC mechanism that is present in the offer, a o For each supported FEC mechanism, "a=rtpmap" and "a=fmtp" lines,
corresponding "a=rtpmap" line indicating the desired FEC codec. as specified in [RFC4566], Section 6. The FEC mechanisms that
MUST be supported are specified in [I-D.ietf-rtcweb-fec],
Section 6, and specific usage for each media type is outlined in
Sections 4 and 5.
o "a=ice-ufrag" and "a=ice-passwd" lines, as specified in [RFC5245], o "a=ice-ufrag" and "a=ice-passwd" lines, as specified in [RFC5245],
Section 15.4. Section 15.4.
o If the "trickle" ICE option is present in the offer, an "a=ice- o If the "trickle" ICE option is present in the offer, an "a=ice-
options" line, with the "trickle" option, as specified in options" line, with the "trickle" option, as specified in
[I-D.ietf-mmusic-trickle-ice], Section 4. [I-D.ietf-mmusic-trickle-ice], Section 4.
o An "a=fingerprint" line, as specified in [RFC4572], Section 5; the o An "a=fingerprint" line, as specified in [RFC4572], Section 5; the
algorithm used for the fingerprint MUST match that used in the algorithm used for the fingerprint MUST match that used in the
certificate signature. certificate signature.
o An "a=setup" line, as specified in [RFC4145], Section 4, and o An "a=setup" line, as specified in [RFC4145], Section 4, and
clarified for use in DTLS-SRTP scenarios in [RFC5763], Section 5. clarified for use in DTLS-SRTP scenarios in [RFC5763], Section 5.
The role value in the answer MUST be "active" or "passive"; the The role value in the answer MUST be "active" or "passive"; the
"active" role is RECOMMENDED. "active" role is RECOMMENDED.
o If present in the offer, an "a=rtcp-mux" line, as specified in o If present in the offer, an "a=rtcp-mux" line, as specified in
[RFC5761], Section 5.1.1. [RFC5761], Section 5.1.1. If the "require" RTCP multiplexing
policy is set and no "a=rtcp-mux" line is present in the offer,
then the m=line MUST be marked as rejected by setting the port in
the m= line to zero, as indicated in [RFC3264], Section 6.
o If present in the offer, an "a=rtcp-rsize" line, as specified in o If present in the offer, an "a=rtcp-rsize" line, as specified in
[RFC5506], Section 5. [RFC5506], Section 5.
o For each supported RTP header extension that is present in the o For each supported RTP header extension that is present in the
offer, an "a=extmap" line, as specified in [RFC5285], Section 5. offer, an "a=extmap" line, as specified in [RFC5285], Section 5.
The list of header extensions that SHOULD/MUST be supported is The list of header extensions that SHOULD/MUST be supported is
specified in [I-D.ietf-rtcweb-rtp-usage], Section 5.2. [TODO: specified in [I-D.ietf-rtcweb-rtp-usage], Section 5.2. Any header
Ensure this contains MID header] Any header extensions that extensions that require encryption MUST be specified as indicated
require encryption MUST be specified as indicated in [RFC6904], in [RFC6904], Section 4.
Section 4.
o For each supported RTCP feedback mechanism that is present in the o For each supported RTCP feedback mechanism that is present in the
offer, an "a=rtcp-fb" mechanism, as specified in [RFC4585], offer, an "a=rtcp-fb" mechanism, as specified in [RFC4585],
Section 4.2. The list of RTCP feedback mechanisms that SHOULD/ Section 4.2. The list of RTCP feedback mechanisms that SHOULD/
MUST be supported is specified in [I-D.ietf-rtcweb-rtp-usage], MUST be supported is specified in [I-D.ietf-rtcweb-rtp-usage],
Section 5.1. Section 5.1.
o If a local MediaStreamTrack has been associated, an "a=ssrc" line, o If a local MediaStreamTrack has been associated, an "a=ssrc" line,
as specified in [RFC5576], Section 4.1, indicating the SSRC to be as specified in [RFC5576], Section 4.1, indicating the SSRC to be
used for sending media. used for sending media.
o If a local MediaStreamTrack has been associated, and RTX has been o If a local MediaStreamTrack has been associated, and RTX has been
negotiated for this m= section, another "a=ssrc" line with the RTX negotiated for this m= section, another "a=ssrc" line with the RTX
SSRC, and an "a=ssrc-group" line, as specified in [RFC5576], SSRC, and an "a=ssrc-group" line, as specified in [RFC5576],
section 4.2, with semantics set to "FID" and including the primary section 4.2, with semantics set to "FID" and including the primary
and RTX SSRCs. and RTX SSRCs.
o If a local MediaStreamTrack has been associated, and FEC has been o If a local MediaStreamTrack has been associated, and FEC has been
negotiated for this m= section, another "a=ssrc" line with the FEC negotiated for this m= section, another "a=ssrc" line with the FEC
SSRC, and an "a=ssrc-group" line, as specified in [RFC5576], SSRC, and an "a=ssrc-group" line with semantics set to "FEC-FR"
section 4.2, with semantics set to "FEC" and including the primary and including the primary and FEC SSRCs, as specified in
and FEC SSRCs. [RFC5956], section 4.3. For simplicity, if both RTX and FEC are
supported, the FEC SSRC MUST be the same as the RTX SSRC.
o [OPEN ISSUE: Handling of a=imageattr] o [OPEN ISSUE: Handling of a=imageattr]
If a data channel m= section has been offered, a m= section MUST also If a data channel m= section has been offered, a m= section MUST also
be generated for data. The <media> field MUST be set to be generated for data. The <media> field MUST be set to
"application" and the <proto> field MUST be set to exactly match the "application" and the <proto> field MUST be set to exactly match the
field in the offer; the "fmt" value MUST be set to the SCTP port field in the offer; the "fmt" value MUST be set to the SCTP port
number, as specified in Section 4.1. [TODO: update this to use number, as specified in Section 4.1. [TODO: update this to use
a=sctp-port, as indicated in the latest data channel docs] a=sctp-port, as indicated in the latest data channel docs]
skipping to change at page 41, line 4 skipping to change at page 41, line 12
the presence of "a=bundle-only" in the offer, no m= sections in the the presence of "a=bundle-only" in the offer, no m= sections in the
answer should have an "a=bundle-only" line. answer should have an "a=bundle-only" line.
Attributes that are common between all m= sections MAY be moved to Attributes that are common between all m= sections MAY be moved to
session-level, if explicitly defined to be valid at session-level. session-level, if explicitly defined to be valid at session-level.
The attributes prohibited in the creation of offers are also The attributes prohibited in the creation of offers are also
prohibited in the creation of answers. prohibited in the creation of answers.
5.3.2. Subsequent Answers 5.3.2. Subsequent Answers
When createAnswer is called a second (or later) time, or is called
after a local description has already been installed, the processing
is somewhat different than for an initial answer.
If the initial answer was not applied using setLocalDescription,
meaning the PeerConnection is still in the "have-remote-offer" state,
the steps for generating an initial answer should be followed,
subject to the following restriction:
o The fields of the "o=" line MUST stay the same except for the
<session-version> field, which MUST increment if the session
description changes in any way from the previously generated
answer.
If any session description was previously supplied to
setLocalDescription, an answer is generated by following the steps in
the "have-remote-offer" state above, along with these exceptions:
o The "s=" and "t=" lines MUST stay the same.
o Each "m=" and c=" line MUST be filled in with the port and address
of the default candidate for the m= section, as described in
[RFC5245], Section 4.3. Note, however, that the m= line protocol
need not match the default candidate, because this protocol value
must instead match what was supplied in the offer, as described
above. Each "a=rtcp" attribute line MUST also be filled in with
the port and address of the appropriate default candidate, either
the default RTP or RTCP candidate, depending on whether RTCP
multiplexing is enabled in the answer. In each case, if no
candidates of the desired type have yet been gathered, dummy
values MUST be used, as described in the initial answer section
above.
o Each "a=ice-ufrag" and "a=ice-pwd" line MUST stay the same.
o Within each m= section, for each candidate that has been gathered
during the most recent gathering phase (see Section 3.4.1), an
"a=candidate" line MUST be added, as specified in [RFC5245],
Section 4.3., paragraph 3. If candidate gathering for the section
has completed, an "a=end-of-candidates" attribute MUST be added,
as described in [I-D.ietf-mmusic-trickle-ice], Section 9.3.
o For MediaStreamTracks that are still present, the "a=msid",
"a=ssrc", and "a=ssrc-group" lines MUST stay the same.
5.3.3. Options Handling 5.3.3. Options Handling
The createOffer method takes as a parameter an RTCAnswerOptions The createAnswer method takes as a parameter an RTCAnswerOptions
object. Special processing is performed when generating a SDP object. The set of parameters for RTCAnswerOptions is different than
description if the following constraints are present. those supported in RTCOfferOptions; the OfferToReceiveAudio,
OfferToReceiveVideo, and IceRestart options mentioned in
Section 5.2.3 are meaningless in the context of generating an answer,
as there is no need to generate extra m= lines in an answer, and ICE
credentials will automatically be changed for all m= lines where the
offerer chose to perform ICE restart.
The following options are supported in RTCAnswerOptions.
5.3.3.1. VoiceActivityDetection 5.3.3.1. VoiceActivityDetection
Handling of the "VoiceActivityDetection" option in answers is the Silence suppression in the answer is handled as described in
same as is indicated for offers in Section 5.2.3.4. Section 5.2.3.4.
5.4. Parsing an Offer 5.4. Processing a Local Description
5.5. Parsing an Answer When a SessionDescription is supplied to setLocalDescription, the
following steps MUST be performed:
5.6. Applying a Local Description o First, the type of the SessionDescription is checked against the
current state of the PeerConnection:
5.7. Applying a Remote Description * If the type is "offer", the PeerConnection state MUST be either
"stable" or "have-local-offer".
* If the type is "pranswer" or "answer", the PeerConnection state
MUST be either "have-remote-offer" or "have-local-pranswer".
o If the type is not correct for the current state, processing MUST
stop and an error MUST be returned.
o Next, the SessionDescription is parsed into a data structure, as
described in the Section 5.6 section below. If parsing fails for
any reason, processing MUST stop and an error MUST be returned.
o Finally, the parsed SessionDescription is applied as described in
the Section 5.7 section below.
5.5. Processing a Remote Description
When a SessionDescription is supplied to setRemoteDescription, the
following steps MUST be performed:
o First, the type of the SessionDescription is checked against the
current state of the PeerConnection:
* If the type is "offer", the PeerConnection state MUST be either
"stable" or "have-remote-offer".
* If the type is "pranswer" or "answer", the PeerConnection state
MUST be either "have-local-offer" or "have-remote-pranswer".
o If the type is not correct for the current state, processing MUST
stop and an error MUST be returned.
o Next, the SessionDescription is parsed into a data structure, as
described in the Section 5.6 section below. If parsing fails for
any reason, processing MUST stop and an error MUST be returned.
o Finally, the parsed SessionDescription is applied as described in
the Section 5.8 section below.
5.6. Parsing a Session Description
[The behavior described herein is a draft version, and needs more
discussion to resolve various open issues.]
When a SessionDescription of any type is supplied to setLocal/
RemoteDescription, the implementation must parse it and reject it if
it is invalid. The exact details of this process are explained
below.
The SDP contained in the session description object consists of a
sequence of text lines, each containing a key-value expression, as
described in [RFC4566], Section 5. The SDP is read, line-by-line,
and converted to a data structure that contains the deserialized
information. However, SDP allows many types of lines, not all of
which are relevant to JSEP applications. For each line, the
implementation will first ensure it is syntactically correct
according its defining ABNF [TODO: reference], check that it conforms
to [RFC4566] and [RFC3264] semantics, and then either parse and store
or discard the provided value, as described below. [TODO: ensure
that every line is listed below.] If the line is not well-formed, or
cannot be parsed as described, the parser MUST stop with an error and
reject the session description. This ensures that implementations do
not accidentally misinterpret ambiguous SDP.
5.6.1. Session-Level Parsing
First, the session-level lines are checked and parsed. These lines
MUST occur in a specific order, and with a specific syntax, as
defined in [RFC4566], Section 5. Note that while the specific line
types (e.g. "v=", "c=") MUST occur in the defined order, lines of the
same type (typically "a=") can occur in any order, and their ordering
is not meaningful.
For non-attribute (non-"a=") lines, their sequencing, syntax, and
semantics, are checked, as mentioned above. The following lines are
not meaningful in the JSEP context and MAY be discarded once they
have been checked.
TODO
The remaining lines are processed as follows:
The "c=" line MUST be parsed and stored.
[OPEN ISSUE: For example, because session-level bandwidth is
ambiguous when multiple media streams are present, a "b=" line at
session level is not useful and its value SHOULD be ignored.
[OPEN ISSUE: is this WG consensus? Are there other non-a= lines
that we need to do more than just syntactical validation, e.g.
v=?]
Specific processing MUST be applied for the following session-level
attribute ("a=") lines:
o Any "a=group" lines are parsed as specified in [RFC5888],
Section 5, and the group's semantics and mids are stored.
o If present, a single "a=ice-lite" line is parsed as specified in
[RFC5245], Section 15.3, and a value indicating the presence of
ice-lite is stored.
o If present, a single "a=ice-ufrag" line is parsed as specified in
[RFC5245], Section 15.4, and the ufrag value is stored.
o If present, a single "a=ice-pwd" line is parsed as specified in
[RFC5245], Section 15.4, and the password value is stored.
o If present, a single "a=ice-options" line is parsed as specified
in [RFC5245], Section 15.5, and the set of specified options is
stored.
o Any "a=fingerprint" lines are parsed as specified in [RFC4572],
Section 5, and the set of fingerprint and algorithm values is
stored.
o If present, a single "a=setup" line is parsed as specified in
[RFC4145], Section 4, and the setup value is stored.
o Any "a=extmap" lines are parsed as specified in [RFC5285],
Section 5, and their values are stored.
o TODO: msid-semantic, identity, rtcp-rsize, rtcp-mux, and any other
attribs valid at session level.
Once all the session-level lines have been parsed, processing
continues with the lines in media sections.
5.6.2. Media Section Parsing
Like the session-level lines, the media session lines MUST occur in
the specific order and with the specific syntax defined in [RFC4566],
Section 5.
The "m=" line itself MUST be parsed as described in [RFC4566],
Section 5.14, and the media, port, proto, and fmt values stored.
Following the "m=" line, specific processing MUST be applied for the
following non-attribute lines:
o The "c=" line, if present, MUST be parsed as specified in
[RFC4566], Section 5.7, and its contents stored.
o The "b=" line, if present, MUST be parsed as specified in
[RFC4566], Section 5.8, and the bwtype and bandwidth values
stored.
Specific processing MUST also be applied for the following attribute
lines:
o If present, a single "a=ice-lite" line is parsed as specified in
[RFC5245], Section 15.3, and a value indicating the presence of
ice-lite is stored.
o If present, a single "a=ice-ufrag" line is parsed as specified in
[RFC5245], Section 15.4, and the ufrag value is stored.
o If present, a single "a=ice-pwd" line is parsed as specified in
[RFC5245], Section 15.4, and the password value is stored.
o If present, a single "a=ice-options" line is parsed as specified
in [RFC5245], Section 15.5, and the set of specified options is
stored.
o Any "a=fingerprint" lines are parsed as specified in [RFC4572],
Section 5, and the set of fingerprint and algorithm values is
stored.
o If present, a single "a=setup" line is parsed as specified in
[RFC4145], Section 4, and the setup value is stored.
If the "m=" proto value indicates use of RTP, as decribed in the
Section 5.1.3 section above, the following attribute lines MUST be
processed:
o The "m=" fmt value MUST be parsed as specified in [RFC4566],
Section 5.14, and the individual values stored.
o Any "a=rtpmap" or "a=fmtp" lines MUST be parsed as specified in
[RFC4566], Section 6, and their values stored.
o If present, a single "a=ptime" line MUST be parsed as described in
[RFC4566], Section 6, and its value stored.
o If present, a single direction attribute line (e.g. "a=sendrecv")
MUST be parsed as described in [RFC4566], Section 6, and its value
stored.
o Any "a=ssrc" or "a=ssrc-group" attributes MUST be parsed as
specified in [RFC5576], Sections 4.1-4.2, and their values stored.
o Any "a=extmap" attributes MUST be parsed as specified in
[RFC5285], Section 5, and their values stored.
o Any "a=rtcp-fb" attributes MUST be parsed as specified in
[RFC4585], Section 4.2., and their values stored.
o If present, a single "a=rtcp-mux" line MUST be parsed as specified
in [RFC5761], Section 5.1.1, and its presence or absence flagged
and stored.
o TODO: a=rtcp-rsize, a=rtcp, a=msid, a=candidate, a=end-of-
candidates
Otherwise, if the "m=" proto value indicats use of SCTP, the
following attribute lines MUST be processed:
o The "m=" fmt value MUST be parsed as specified in
[I-D.ietf-mmusic-sctp-sdp], Section 4.3, and the application
protocol value stored.
o An "a=sctp-port" attribute MUST be present, and it MUST be parsed
as specified in [I-D.ietf-mmusic-sctp-sdp], Section 5.2, and the
value stored.
o TODO: max message size
5.6.3. Semantics Verification
Assuming parsing completes successfully, the parsed description is
then evaluated to ensure internal consistency as well as proper
support for mandatory features. Specifically, the following checks
are performed:
o For each m= section, valid values for each of the mandatory-to-use
features enumerated in Section 5.1.2 MUST be present. These
values MAY either be present at the media level, or inherited from
the session level.
* ICE ufrag and password values
* DTLS fingerprint and setup values
If this session description is of type "pranswer" or "answer", the
following additional checks are applied:
o The session description must follow the rules defined in
[RFC3264], Section 6.
o For each m= section, the protocol value MUST exactly match the
protocol value in the corresponding m= section in the associated
offer.
5.7. Applying a Local Description
The following steps are performed at the media engine level to apply
a local description.
First, the parsed parameters are checked to ensure that any
modifications performed fall within those explicitly permitted by
Section 6; otherwise, processing MUST stop and an error MUST be
returned.
Next, media sections are processed. For each media section, the
following steps MUST be performed; if any parameters are out of
bounds, or cannot be applied, processing MUST stop and an error MUST
be returned.
o TODO
Finally, if this description is of type "pranswer" or "answer",
follow the processing defined in the Section 5.9 section below.
5.8. Applying a Remote Description
TODO
5.9. Applying an Answer
TODO
6. Configurable SDP Parameters 6. Configurable SDP Parameters
It is possible to change elements in the SDP returned from It is possible to change elements in the SDP returned from
createOffer before passing it to setLocalDescription. When an createOffer before passing it to setLocalDescription. When an
implementation receives modified SDP it MUST either: implementation receives modified SDP it MUST either:
o Accept the changes and adjust its behavior to match the SDP. o Accept the changes and adjust its behavior to match the SDP.
o Reject the changes and return an error via the error callback. o Reject the changes and return an error via the error callback.
Changes MUST NOT be silently ignored. Changes MUST NOT be silently ignored.
The following elements of the SDP media description MUST NOT be The following elements of the SDP media description MUST NOT be
changed between the createOffer and the setLocalDescription, since changed between the createOffer and the setLocalDescription (or
they reflect transport attributes that are solely under browser between the createAnswer and the setLocalDescription), since they
control, and the browser MUST NOT honor an attempt to change them: reflect transport attributes that are solely under browser control,
and the browser MUST NOT honor an attempt to change them:
o The number, type and port number of m= lines. o The number, type and port number of m= lines.
o The generated ICE credentials (a=ice-ufrag and a=ice-pwd). o The generated ICE credentials (a=ice-ufrag and a=ice-pwd).
o The set of ICE candidates and their parameters (a=candidate). o The set of ICE candidates and their parameters (a=candidate).
o The DTLS fingerprint(s) (a=fingerprint).
The following modifications, if done by the browser to a description The following modifications, if done by the browser to a description
between createOffer/createAnswer and the setLocalDescription, MUST be between createOffer/createAnswer and the setLocalDescription, MUST be
honored by the browser: honored by the browser:
o Remove or reorder codecs (m=) o Remove or reorder codecs (m=)
The following parameters may be controlled by constraints passed into The following parameters may be controlled by options passed into
createOffer/createAnswer. As an open issue, these changes may also createOffer/createAnswer. As an open issue, these changes may also
be be performed by manipulating the SDP returned from createOffer/ be be performed by manipulating the SDP returned from createOffer/
createAnswer, as indicated above, as long as the capabilities of the createAnswer, as indicated above, as long as the capabilities of the
endpoint are not exceeded (e.g. asking for a resolution greater than endpoint are not exceeded (e.g. asking for a resolution greater than
what the endpoint can encode): what the endpoint can encode):
o [[OPEN ISSUE: This is a placeholder for other modifications, which o [[OPEN ISSUE: This is a placeholder for other modifications, which
we may continue adding as use cases appear.]] we may continue adding as use cases appear.]]
Implementations MAY choose to either honor or reject any elements not Implementations MAY choose to either honor or reject any elements not
skipping to change at page 44, line 10 skipping to change at page 51, line 10
Alice's side and Bob's side waits for all candidates before sending Alice's side and Bob's side waits for all candidates before sending
the offer or answer, so the offers and answers are complete. Trickle the offer or answer, so the offers and answers are complete. Trickle
ICE is not used. Both Alice and Bob are using the default policy of ICE is not used. Both Alice and Bob are using the default policy of
balanced. balanced.
// set up local media state // set up local media state
AliceJS->AliceUA: create new PeerConnection AliceJS->AliceUA: create new PeerConnection
AliceJS->AliceUA: addStream with stream containing audio and video AliceJS->AliceUA: addStream with stream containing audio and video
AliceJS->AliceUA: createOffer to get offer AliceJS->AliceUA: createOffer to get offer
AliceJS->AliceUA: setLocalDescription with offer AliceJS->AliceUA: setLocalDescription with offer
AliceUA->AliceJS: multiple onicecandidate callbacks with candidates AliceUA->AliceJS: multiple onicecandidate events with candidates
// wait for ICE gathering to complete // wait for ICE gathering to complete
AliceUA->AliceJS: onicecandidate callback with null candidate AliceUA->AliceJS: onicecandidate event with null candidate
AliceJS->AliceUA: get |offer-A1| from value of localDescription AliceJS->AliceUA: get |offer-A1| from value of localDescription
// |offer-A1| is sent over signaling protocol to Bob // |offer-A1| is sent over signaling protocol to Bob
AliceJS->WebServer: signaling with |offer-A1| AliceJS->WebServer: signaling with |offer-A1|
WebServer->BobJS: signaling with |offer-A1| WebServer->BobJS: signaling with |offer-A1|
// |offer-A1| arrives at Bob // |offer-A1| arrives at Bob
BobJS->BobUA: create a PeerConnection BobJS->BobUA: create a PeerConnection
BobJS->BobUA: setRemoteDescription with |offer-A1| BobJS->BobUA: setRemoteDescription with |offer-A1|
BobUA->BobJS: onaddstream callback with remoteStream BobUA->BobJS: onaddstream event with remoteStream
// Bob accepts call // Bob accepts call
BobJS->BobUA: addStream with local media BobJS->BobUA: addStream with local media
BobJS->BobUA: createAnswer BobJS->BobUA: createAnswer
BobJS->BobUA: setLocalDescription with answer BobJS->BobUA: setLocalDescription with answer
BobUA->BobJS: multiple onicecandidate callbacks with candidates BobUA->BobJS: multiple onicecandidate events with candidates
// wait for ICE gathering to complete // wait for ICE gathering to complete
BobUA->BobJS: onicecandidate callback with null candidate BobUA->BobJS: onicecandidate event with null candidate
BobJS->BobUA: get |answer-A1| from value of localDescription BobJS->BobUA: get |answer-A1| from value of localDescription
// |answer-A1| is sent over signaling protocol to Alice // |answer-A1| is sent over signaling protocol to Alice
BobJS->WebServer: signaling with |answer-A1| BobJS->WebServer: signaling with |answer-A1|
WebServer->AliceJS: signaling with |answer-A1| WebServer->AliceJS: signaling with |answer-A1|
// |answer-A1| arrives at Alice // |answer-A1| arrives at Alice
AliceJS->AliceUA: setRemoteDescription with |answer-A1| AliceJS->AliceUA: setRemoteDescription with |answer-A1|
AliceUA->AliceJS: onaddstream callback with remoteStream AliceUA->AliceJS: onaddstream event with remoteStream
// media flows // media flows
BobUA->AliceUA: media sent from Bob to Alice BobUA->AliceUA: media sent from Bob to Alice
AliceUA->BobUA: media sent from Alice to Bob AliceUA->BobUA: media sent from Alice to Bob
The SDP for |offer-A1| looks like: The SDP for |offer-A1| looks like:
v=0 v=0
o=- 4962303333179871722 1 IN IP4 0.0.0.0 o=- 4962303333179871722 1 IN IP4 0.0.0.0
s=- s=-
skipping to change at page 47, line 38 skipping to change at page 54, line 38
a=ssrc:3229706346 cname:Q/NWs1ao1HmN4Xa5 a=ssrc:3229706346 cname:Q/NWs1ao1HmN4Xa5
a=ssrc-group:FID 3229706345 3229706346 a=ssrc-group:FID 3229706345 3229706346
a=candidate:2299743422 1 udp 2113937151 192.0.2.2 20001 a=candidate:2299743422 1 udp 2113937151 192.0.2.2 20001
typ host typ host
a=end-of-candidates a=end-of-candidates
7.2. Normal Examples 7.2. Normal Examples
This section shows a typical example of a session between two This section shows a typical example of a session between two
browsers setting up an audio channel and a data channel. Trickle ICE browsers setting up an audio channel and a data channel. Trickle ICE
is used in full trickle mode with a policy of max-bundle-and-rtcp-mux is used in full trickle mode with a bundle policy of max-bundle, an
and a single TURN server. Later, two video flows, one for the RTCP mux policy of require, and a single TURN server. Later, two
presenter and one for screen sharing, are added to the session. This video flows, one for the presenter and one for screen sharing, are
example shows Alice's browser initiating the session to Bob's added to the session. This example shows Alice's browser initiating
browser. The messages from Alice's JS to Bob's JS are assumed to the session to Bob's browser. The messages from Alice's JS to Bob's
flow over some signaling protocol via a web server. JS are assumed to flow over some signaling protocol via a web server.
// set up local media state // set up local media state
AliceJS->AliceUA: create new PeerConnection AliceJS->AliceUA: create new PeerConnection
AliceJS->AliceUA: addStream that contains audio track AliceJS->AliceUA: addStream that contains audio track
AliceJS->AliceUA: createDataChannel to get data channel AliceJS->AliceUA: createDataChannel to get data channel
AliceJS->AliceUA: createOffer to get |offer-B1| AliceJS->AliceUA: createOffer to get |offer-B1|
AliceJS->AliceUA: setLocalDescription with |offer-B1| AliceJS->AliceUA: setLocalDescription with |offer-B1|
// |offer-B1| is sent over signaling protocol to Bob // |offer-B1| is sent over signaling protocol to Bob
AliceJS->WebServer: signaling with |offer-B1| AliceJS->WebServer: signaling with |offer-B1|
WebServer->BobJS: signaling with |offer-B1| WebServer->BobJS: signaling with |offer-B1|
// |offer-B1| arrives at Bob // |offer-B1| arrives at Bob
BobJS->BobUA: create a PeerConnection BobJS->BobUA: create a PeerConnection
BobJS->BobUA: setRemoteDescription with |offer-B1| BobJS->BobUA: setRemoteDescription with |offer-B1|
BobUA->BobJS: onaddstream with audio track from Alice BobUA->BobJS: onaddstream with audio track from Alice
// candidates are sent to Bob // candidates are sent to Bob
AliceUA->AliceJS: onicecandidate callback with |candidate-B1| (host) AliceUA->AliceJS: onicecandidate event with |candidate-B1| (host)
AliceJS->WebServer: signaling with |candidate-B1| AliceJS->WebServer: signaling with |candidate-B1|
AliceUA->AliceJS: onicecandidate callback with |candidate-B2| (srflx) AliceUA->AliceJS: onicecandidate event with |candidate-B2| (srflx)
AliceJS->WebServer: signaling with |candidate-B2| AliceJS->WebServer: signaling with |candidate-B2|
AliceUA->AliceJS: onicecandidate callback with |candidate-B3| (relay) AliceUA->AliceJS: onicecandidate event with |candidate-B3| (relay)
AliceJS->WebServer: signaling with |candidate-B3| AliceJS->WebServer: signaling with |candidate-B3|
WebServer->BobJS: signaling with |candidate-B1| WebServer->BobJS: signaling with |candidate-B1|
BobJS->BobUA: addIceCandidate with |candidate-B1| BobJS->BobUA: addIceCandidate with |candidate-B1|
WebServer->BobJS: signaling with |candidate-B2| WebServer->BobJS: signaling with |candidate-B2|
BobJS->BobUA: addIceCandidate with |candidate-B2| BobJS->BobUA: addIceCandidate with |candidate-B2|
WebServer->BobJS: signaling with |candidate-B3| WebServer->BobJS: signaling with |candidate-B3|
BobJS->BobUA: addIceCandidate with |candidate-B3| BobJS->BobUA: addIceCandidate with |candidate-B3|
// Bob accepts call // Bob accepts call
BobJS->BobUA: addStream with local audio stream BobJS->BobUA: addStream with local audio stream
BobJS->BobUA: createDataChannel to get data channel BobJS->BobUA: createDataChannel to get data channel
BobJS->BobUA: createAnswer to get |answer-B1| BobJS->BobUA: createAnswer to get |answer-B1|
BobJS->BobUA: setLocalDescription with |answer-B1| BobJS->BobUA: setLocalDescription with |answer-B1|
// |answer-B1| is sent to Alice // |answer-B1| is sent to Alice
BobJS->WebServer: signaling with |answer-B1| BobJS->WebServer: signaling with |answer-B1|
WebServer->AliceJS: signaling with |answer-B1| WebServer->AliceJS: signaling with |answer-B1|
AliceJS->AliceUA: setRemoteDescription with |answer-B1| AliceJS->AliceUA: setRemoteDescription with |answer-B1|
AliceUA->AliceJS: onaddstream callback with audio track from Bob AliceUA->AliceJS: onaddstream event with audio track from Bob
// candidates are sent to Alice // candidates are sent to Alice
BobUA->BobJS: onicecandidate callback with |candidate-B4| (host) BobUA->BobJS: onicecandidate event with |candidate-B4| (host)
BobJS->WebServer: signaling with |candidate-B4| BobJS->WebServer: signaling with |candidate-B4|
BobUA->BobJS: onicecandidate callback with |candidate-B5| (srflx) BobUA->BobJS: onicecandidate event with |candidate-B5| (srflx)
BobJS->WebServer: signaling with |candidate-B5| BobJS->WebServer: signaling with |candidate-B5|
BobUA->BobJS: onicecandidate callback with |candidate-B6| (relay) BobUA->BobJS: onicecandidate event with |candidate-B6| (relay)
BobJS->WebServer: signaling with |candidate-B6| BobJS->WebServer: signaling with |candidate-B6|
WebServer->AliceJS: signaling with |candidate-B4| WebServer->AliceJS: signaling with |candidate-B4|
AliceJS->AliceUA: addIceCandidate with |candidate-B4| AliceJS->AliceUA: addIceCandidate with |candidate-B4|
WebServer->AliceJS: signaling with |candidate-B5| WebServer->AliceJS: signaling with |candidate-B5|
AliceJS->AliceUA: addIceCandidate with |candidate-B5| AliceJS->AliceUA: addIceCandidate with |candidate-B5|
WebServer->AliceJS: signaling with |candidate-B6| WebServer->AliceJS: signaling with |candidate-B6|
AliceJS->AliceUA: addIceCandidate with |candidate-B6| AliceJS->AliceUA: addIceCandidate with |candidate-B6|
// data channel opens // data channel opens
BobUA->BobJS: ondatachannel callback BobUA->BobJS: ondatachannel event
AliceUA->AliceJS: ondatachannel callback AliceUA->AliceJS: ondatachannel event
BobUA->BobJS: onopen BobUA->BobJS: onopen
AliceUA->AliceJS: onopen AliceUA->AliceJS: onopen
// media is flowing between browsers // media is flowing between browsers
BobUA->AliceUA: audio+data sent from Bob to Alice BobUA->AliceUA: audio+data sent from Bob to Alice
AliceUA->BobUA: audio+data sent from Alice to Bob AliceUA->BobUA: audio+data sent from Alice to Bob
// some time later Bob adds two video streams // some time later Bob adds two video streams
// note, no candidates exchanged, because of BUNDLE // note, no candidates exchanged, because of BUNDLE
BobJS->BobUA: addStream with first video stream BobJS->BobUA: addStream with first video stream
BobJS->BobUA: addStream with second video stream BobJS->BobUA: addStream with second video stream
BobJS->BobUA: createOffer to get |offer-B2| BobJS->BobUA: createOffer to get |offer-B2|
BobJS->BobUA: setLocalDescription with |offer-B2| BobJS->BobUA: setLocalDescription with |offer-B2|
// |offer-B2| is sent to Alice // |offer-B2| is sent to Alice
BobJS->WebServer: signaling with |offer-B2| BobJS->WebServer: signaling with |offer-B2|
WebServer->AliceJS: signaling with |offer-B2| WebServer->AliceJS: signaling with |offer-B2|
AliceJS->AliceUA: setRemoteDescription with |offer-B2| AliceJS->AliceUA: setRemoteDescription with |offer-B2|
AliceUA->AliceJS: onaddstream callback with first video stream AliceUA->AliceJS: onaddstream event with first video stream
AliceUA->AliceJS: onaddstream callback with second video stream AliceUA->AliceJS: onaddstream event with second video stream
AliceJS->AliceUA: createAnswer to get |answer-B2| AliceJS->AliceUA: createAnswer to get |answer-B2|
AliceJS->AliceUA: setLocalDescription with |answer-B2| AliceJS->AliceUA: setLocalDescription with |answer-B2|
// |answer-B2| is sent over signaling protocol to Bob // |answer-B2| is sent over signaling protocol to Bob
AliceJS->WebServer: signaling with |answer-B2| AliceJS->WebServer: signaling with |answer-B2|
WebServer->BobJS: signaling with |answer-B2| WebServer->BobJS: signaling with |answer-B2|
BobJS->BobUA: setRemoteDescription with |answer-B2| BobJS->BobUA: setRemoteDescription with |answer-B2|
// media is flowing between browsers // media is flowing between browsers
BobUA->AliceUA: audio+video+data sent from Bob to Alice BobUA->AliceUA: audio+video+data sent from Bob to Alice
AliceUA->BobUA: audio+video+data sent from Alice to Bob AliceUA->BobUA: audio+video+data sent from Alice to Bob
The SDP for |offer-B1| looks like: The SDP for |offer-B1| looks like:
v=0 v=0
o=- 4962303333179871723 1 IN IP4 0.0.0.0 o=- 4962303333179871723 1 IN IP4 0.0.0.0
s=- s=-
t=0 0 t=0 0
a=msid-semantic:WMS a=msid-semantic:WMS
a=group:BUNDLE a1 d1 a=group:BUNDLE a1 d1
m=audio 9 UDP/TLS/RTP/SAVPF 96 0 8 97 98 m=audio 9 UDP/TLS/RTP/SAVPF 96 0 8 97 98
skipping to change at page 50, line 37 skipping to change at page 57, line 37
a=fingerprint:sha-256 a=fingerprint:sha-256
19:E2:1C:3B:4B:9F:81:E6:B8:5C:F4:A5:A8:D8:73:04 19:E2:1C:3B:4B:9F:81:E6:B8:5C:F4:A5:A8:D8:73:04
:BB:05:2F:70:9F:04:A9:0E:05:E9:26:33:E8:70:88:A2 :BB:05:2F:70:9F:04:A9:0E:05:E9:26:33:E8:70:88:A2
a=setup:actpass a=setup:actpass
a=rtcp-mux a=rtcp-mux
a=rtcp-rsize a=rtcp-rsize
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:mid
a=ssrc:1732846380 cname:FocUG1f0fcg/yvY7 a=ssrc:1732846380 cname:FocUG1f0fcg/yvY7
m=application 9 UDP/TLS/SCTP webrtc-datachannel m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP6 :: c=IN IP6 ::
a=mid:d1 a=mid:d1
a=fmtp:webrtc-datachannel max-message-size=65536 a=fmtp:webrtc-datachannel max-message-size=65536
a=sctp-port 5000 a=sctp-port 5000
a=ice-ufrag:ATEn1v9DoTMB9J4r a=ice-ufrag:ATEn1v9DoTMB9J4r
a=ice-pwd:AtSK0WpNtpUjkY4+86js7ZQl a=ice-pwd:AtSK0WpNtpUjkY4+86js7ZQl
a=ice-options:trickle a=ice-options:trickle
a=fingerprint:sha-256 19:E2:1C:3B:4B:9F:81:E6:B8:5C:F4:A5:A8:D8:73:04 a=fingerprint:sha-256 19:E2:1C:3B:4B:9F:81:E6:B8:5C:F4:A5:A8:D8:73:04
:BB:05:2F:70:9F:04:A9:0E:05:E9:26:33:E8:70:88:A2 :BB:05:2F:70:9F:04:A9:0E:05:E9:26:33:E8:70:88:A2
a=setup:actpass a=setup:actpass
skipping to change at page 52, line 36 skipping to change at page 59, line 36
a=ice-options:trickle a=ice-options:trickle
a=fingerprint:sha-256 6B:8B:F0:65:5F:78:E2:51:3B:AC:6F:F3:3F:46:1B:35 a=fingerprint:sha-256 6B:8B:F0:65:5F:78:E2:51:3B:AC:6F:F3:3F:46:1B:35
:DC:B8:5F:64:1A:24:C2:43:F0:A1:58:D0:A1:2C:19:08 :DC:B8:5F:64:1A:24:C2:43:F0:A1:58:D0:A1:2C:19:08
a=setup:active a=setup:active
a=rtcp-mux a=rtcp-mux
a=rtcp-rsize a=rtcp-rsize
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:mid
a=ssrc:4429951804 cname:Q/NWs1ao1HmN4Xa5 a=ssrc:4429951804 cname:Q/NWs1ao1HmN4Xa5
m=application 9 UDP/TLS/SCTP webrtc-datachannel m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP6 :: c=IN IP6 ::
a=mid:d1 a=mid:d1
a=fmtp:webrtc-datachannel max-message-size=65536 a=fmtp:webrtc-datachannel max-message-size=65536
a=sctp-port 5000 a=sctp-port 5000
a=ice-ufrag:7sFvz2gdLkEwjZEr a=ice-ufrag:7sFvz2gdLkEwjZEr
a=ice-pwd:dOTZKZNVlO9RSGsEGM63JXT2 a=ice-pwd:dOTZKZNVlO9RSGsEGM63JXT2
a=ice-options:trickle a=ice-options:trickle
a=fingerprint:sha-256 6B:8B:F0:65:5F:78:E2:51:3B:AC:6F:F3:3F:46:1B:35 a=fingerprint:sha-256 6B:8B:F0:65:5F:78:E2:51:3B:AC:6F:F3:3F:46:1B:35
:DC:B8:5F:64:1A:24:C2:43:F0:A1:58:D0:A1:2C:19:08 :DC:B8:5F:64:1A:24:C2:43:F0:A1:58:D0:A1:2C:19:08
a=setup:active a=setup:active
skipping to change at page 54, line 4 skipping to change at page 61, line 4
a=rtcp-rsize a=rtcp-rsize
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:mid
a=ssrc:4429951804 cname:Q/NWs1ao1HmN4Xa5 a=ssrc:4429951804 cname:Q/NWs1ao1HmN4Xa5
a=candidate:109270924 1 udp 2122194687 192.168.2.3 61665 typ host a=candidate:109270924 1 udp 2122194687 192.168.2.3 61665 typ host
a=candidate:4036177504 1 udp 1685987071 55.66.77.88 64532 typ srflx a=candidate:4036177504 1 udp 1685987071 55.66.77.88 64532 typ srflx
raddr 192.168.2.3 rport 61665 raddr 192.168.2.3 rport 61665
a=candidate:3671762467 1 udp 41819903 66.77.88.99 50416 typ relay a=candidate:3671762467 1 udp 41819903 66.77.88.99 50416 typ relay
raddr 55.66.77.88 rport 64532 raddr 55.66.77.88 rport 64532
a=end-of-candidates a=end-of-candidates
m=application 64532 UDP/TLS/SCTP webrtc-datachannel m=application 64532 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 55.66.77.88 c=IN IP4 55.66.77.88
a=mid:d1 a=mid:d1
a=fmtp:webrtc-datachannel max-message-size=65536 a=fmtp:webrtc-datachannel max-message-size=65536
a=sctp-port 5000 a=sctp-port 5000
a=ice-ufrag:7sFvz2gdLkEwjZEr a=ice-ufrag:7sFvz2gdLkEwjZEr
a=ice-pwd:dOTZKZNVlO9RSGsEGM63JXT2 a=ice-pwd:dOTZKZNVlO9RSGsEGM63JXT2
a=ice-options:trickle a=ice-options:trickle
a=fingerprint:sha-256 6B:8B:F0:65:5F:78:E2:51:3B:AC:6F:F3:3F:46:1B:35 a=fingerprint:sha-256 6B:8B:F0:65:5F:78:E2:51:3B:AC:6F:F3:3F:46:1B:35
:DC:B8:5F:64:1A:24:C2:43:F0:A1:58:D0:A1:2C:19:08 :DC:B8:5F:64:1A:24:C2:43:F0:A1:58:D0:A1:2C:19:08
a=setup:actpass a=setup:actpass
skipping to change at page 56, line 22 skipping to change at page 63, line 22
a=rtpmap:8 PCMA/8000 a=rtpmap:8 PCMA/8000
a=rtpmap:97 telephone-event/8000 a=rtpmap:97 telephone-event/8000
a=rtpmap:98 telephone-event/48000 a=rtpmap:98 telephone-event/48000
a=maxptime:120 a=maxptime:120
a=ice-ufrag:ATEn1v9DoTMB9J4r a=ice-ufrag:ATEn1v9DoTMB9J4r
a=ice-pwd:AtSK0WpNtpUjkY4+86js7ZQl a=ice-pwd:AtSK0WpNtpUjkY4+86js7ZQl
a=ice-options:trickle a=ice-options:trickle
a=fingerprint:sha-256 a=fingerprint:sha-256
19:E2:1C:3B:4B:9F:81:E6:B8:5C:F4:A5:A8:D8:73:04 19:E2:1C:3B:4B:9F:81:E6:B8:5C:F4:A5:A8:D8:73:04
:BB:05:2F:70:9F:04:A9:0E:05:E9:26:33:E8:70:88:A2 :BB:05:2F:70:9F:04:A9:0E:05:E9:26:33:E8:70:88:A2
a=setup:actpass a=setup:passive
a=rtcp-mux a=rtcp-mux
a=rtcp-rsize a=rtcp-rsize
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:mid
a=ssrc:1732846380 cname:FocUG1f0fcg/yvY7 a=ssrc:1732846380 cname:FocUG1f0fcg/yvY7
a=candidate:109270923 1 udp 2122194687 192.168.1.2 51556 typ host a=candidate:109270923 1 udp 2122194687 192.168.1.2 51556 typ host
a=candidate:4036177503 1 udp 1685987071 11.22.33.44 52546 typ srflx a=candidate:4036177503 1 udp 1685987071 11.22.33.44 52546 typ srflx
raddr 192.168.1.2 rport 51556 raddr 192.168.1.2 rport 51556
a=candidate:3671762466 1 udp 41819903 22.33.44.55 61405 typ relay a=candidate:3671762466 1 udp 41819903 22.33.44.55 61405 typ relay
raddr 11.22.33.44 rport 52546 raddr 11.22.33.44 rport 52546
a=end-of-candidates a=end-of-candidates
m=application 52546 UDP/TLS/SCTP webrtc-datachannel m=application 52546 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 11.22.33.44 c=IN IP4 11.22.33.44
a=mid:d1 a=mid:d1
a=fmtp:webrtc-datachannel max-message-size=65536 a=fmtp:webrtc-datachannel max-message-size=65536
a=sctp-port 5000 a=sctp-port 5000
a=ice-ufrag:ATEn1v9DoTMB9J4r a=ice-ufrag:ATEn1v9DoTMB9J4r
a=ice-pwd:AtSK0WpNtpUjkY4+86js7ZQl a=ice-pwd:AtSK0WpNtpUjkY4+86js7ZQl
a=ice-options:trickle a=ice-options:trickle
a=fingerprint:sha-256 19:E2:1C:3B:4B:9F:81:E6:B8:5C:F4:A5:A8:D8:73:04 a=fingerprint:sha-256 19:E2:1C:3B:4B:9F:81:E6:B8:5C:F4:A5:A8:D8:73:04
:BB:05:2F:70:9F:04:A9:0E:05:E9:26:33:E8:70:88:A2 :BB:05:2F:70:9F:04:A9:0E:05:E9:26:33:E8:70:88:A2
a=setup:actpass a=setup:passive
a=candidate:109270923 1 udp 2122194687 192.168.1.2 51556 typ host a=candidate:109270923 1 udp 2122194687 192.168.1.2 51556 typ host
a=candidate:4036177503 1 udp 1685987071 11.22.33.44 52546 typ srflx a=candidate:4036177503 1 udp 1685987071 11.22.33.44 52546 typ srflx
raddr 192.168.1.2 rport 51556 raddr 192.168.1.2 rport 51556
a=candidate:3671762466 1 udp 41819903 22.33.44.55 61405 typ relay a=candidate:3671762466 1 udp 41819903 22.33.44.55 61405 typ relay
raddr 11.22.33.44 rport 52546 raddr 11.22.33.44 rport 52546
a=end-of-candidates a=end-of-candidates
m=video 52546 UDP/TLS/RTP/SAVPF 100 101 m=video 52546 UDP/TLS/RTP/SAVPF 100 101
c=IN IP4 11.22.33.44 c=IN IP4 11.22.33.44
a=rtcp:52546 IN IP4 11.22.33.44 a=rtcp:52546 IN IP4 11.22.33.44
a=mid:v1 a=mid:v1
skipping to change at page 60, line 5 skipping to change at page 67, line 5
[I-D.ietf-rtcweb-audio] [I-D.ietf-rtcweb-audio]
Valin, J. and C. Bran, "WebRTC Audio Codec and Processing Valin, J. and C. Bran, "WebRTC Audio Codec and Processing
Requirements", draft-ietf-rtcweb-audio-02 (work in Requirements", draft-ietf-rtcweb-audio-02 (work in
progress), August 2013. progress), August 2013.
[I-D.ietf-rtcweb-data-protocol] [I-D.ietf-rtcweb-data-protocol]
Jesup, R., Loreto, S., and M. Tuexen, "WebRTC Data Channel Jesup, R., Loreto, S., and M. Tuexen, "WebRTC Data Channel
Protocol", draft-ietf-rtcweb-data-protocol-04 (work in Protocol", draft-ietf-rtcweb-data-protocol-04 (work in
progress), February 2013. progress), February 2013.
[I-D.ietf-rtcweb-fec]
Uberti, J., "WebRTC Forward Error Correction
Requirements", draft-ietf-rtcweb-fec-00 (work in
progress), February 2015.
[I-D.ietf-rtcweb-rtp-usage] [I-D.ietf-rtcweb-rtp-usage]
Perkins, C., Westerlund, M., and J. Ott, "Web Real-Time Perkins, C., Westerlund, M., and J. Ott, "Web Real-Time
Communication (WebRTC): Media Transport and Use of RTP", Communication (WebRTC): Media Transport and Use of RTP",
draft-ietf-rtcweb-rtp-usage-09 (work in progress), draft-ietf-rtcweb-rtp-usage-09 (work in progress),
September 2013. September 2013.
[I-D.ietf-rtcweb-security] [I-D.ietf-rtcweb-security]
Rescorla, E., "Security Considerations for WebRTC", draft- Rescorla, E., "Security Considerations for WebRTC", draft-
ietf-rtcweb-security-06 (work in progress), January 2014. ietf-rtcweb-security-06 (work in progress), January 2014.
[I-D.ietf-rtcweb-security-arch] [I-D.ietf-rtcweb-security-arch]
Rescorla, E., "WebRTC Security Architecture", draft-ietf- Rescorla, E., "WebRTC Security Architecture", draft-ietf-
rtcweb-security-arch-09 (work in progress), February 2014. rtcweb-security-arch-09 (work in progress), February 2014.
[I-D.ietf-rtcweb-video]
Roach, A., "WebRTC Video Processing and Codec
Requirements", draft-ietf-rtcweb-video-00 (work in
progress), July 2014.
[I-D.nandakumar-mmusic-proto-iana-registration] [I-D.nandakumar-mmusic-proto-iana-registration]
Nandakumar, S., "IANA registration of SDP 'proto' Nandakumar, S., "IANA registration of SDP 'proto'
attribute for transporting RTP Media over TCP under attribute for transporting RTP Media over TCP under
various RTP profiles.", September 2014. various RTP profiles.", September 2014.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston,
A., Peterson, J., Sparks, R., Handley, M., and E. A., Peterson, J., Sparks, R., Handley, M., and E.
skipping to change at page 61, line 32 skipping to change at page 68, line 39
[RFC5285] Singer, D. and H. Desineni, "A General Mechanism for RTP [RFC5285] Singer, D. and H. Desineni, "A General Mechanism for RTP
Header Extensions", RFC 5285, July 2008. Header Extensions", RFC 5285, July 2008.
[RFC5761] Perkins, C. and M. Westerlund, "Multiplexing RTP Data and [RFC5761] Perkins, C. and M. Westerlund, "Multiplexing RTP Data and
Control Packets on a Single Port", RFC 5761, April 2010. Control Packets on a Single Port", RFC 5761, April 2010.
[RFC5888] Camarillo, G. and H. Schulzrinne, "The Session Description [RFC5888] Camarillo, G. and H. Schulzrinne, "The Session Description
Protocol (SDP) Grouping Framework", RFC 5888, June 2010. Protocol (SDP) Grouping Framework", RFC 5888, June 2010.
[RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer
Security Version 1.2", RFC 6347, January 2012.
[RFC6904] Lennox, J., "Encryption of Header Extensions in the Secure [RFC6904] Lennox, J., "Encryption of Header Extensions in the Secure
Real-time Transport Protocol (SRTP)", RFC 6904, April Real-time Transport Protocol (SRTP)", RFC 6904, April
2013. 2013.
[RFC7022] Begen, A., Perkins, C., Wing, D., and E. Rescorla, [RFC7022] Begen, A., Perkins, C., Wing, D., and E. Rescorla,
"Guidelines for Choosing RTP Control Protocol (RTCP) "Guidelines for Choosing RTP Control Protocol (RTCP)
Canonical Names (CNAMEs)", RFC 7022, September 2013. Canonical Names (CNAMEs)", RFC 7022, September 2013.
11.2. Informative References 11.2. Informative References
skipping to change at page 62, line 34 skipping to change at page 69, line 48
[RFC5763] Fischl, J., Tschofenig, H., and E. Rescorla, "Framework [RFC5763] Fischl, J., Tschofenig, H., and E. Rescorla, "Framework
for Establishing a Secure Real-time Transport Protocol for Establishing a Secure Real-time Transport Protocol
(SRTP) Security Context Using Datagram Transport Layer (SRTP) Security Context Using Datagram Transport Layer
Security (DTLS)", RFC 5763, May 2010. Security (DTLS)", RFC 5763, May 2010.
[RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer [RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer
Security (DTLS) Extension to Establish Keys for the Secure Security (DTLS) Extension to Establish Keys for the Secure
Real-time Transport Protocol (SRTP)", RFC 5764, May 2010. Real-time Transport Protocol (SRTP)", RFC 5764, May 2010.
[RFC5956] Begen, A., "Forward Error Correction Grouping Semantics in
the Session Description Protocol", RFC 5956, September
2010.
[W3C.WD-webrtc-20140617] [W3C.WD-webrtc-20140617]
Bergkvist, A., Burnett, D., Narayanan, A., and C. Bergkvist, A., Burnett, D., Narayanan, A., and C.
Jennings, "WebRTC 1.0: Real-time Communication Between Jennings, "WebRTC 1.0: Real-time Communication Between
Browsers", World Wide Web Consortium WD WD-webrtc- Browsers", World Wide Web Consortium WD WD-webrtc-
20140617, June 2014, 20140617, June 2014,
<http://www.w3.org/TR/2011/WD-webrtc-20140617>. <http://www.w3.org/TR/2011/WD-webrtc-20140617>.
Appendix A. Change log Appendix A. Change log
Note: This section will be removed by RFC Editor before publication. Note: This section will be removed by RFC Editor before publication.
Changes in draft-09:">
o Don't return null for {local,remote}Description after close().
o Changed TCP/TLS to UDP/DTLS in RTP profile names.
o Separate out bundle and mux policy.
o Added specific references to FEC mechanisms.
o Added canTrickle mechanism.
o Added section on subsequent answers and, answer options.
o Added text defining set{Local,Remote}Description behavior.
Changes in draft-08: Changes in draft-08:
o Added new example section and removed old examples in appendix. o Added new example section and removed old examples in appendix.
o Fixed <proto> field handling. o Fixed <proto> field handling.
o Added text describing a=rtcp attribute. o Added text describing a=rtcp attribute.
o Reworked handling of OfferToReceiveAudio and OfferToReceiveVideo o Reworked handling of OfferToReceiveAudio and OfferToReceiveVideo
per discussion at IETF 90. per discussion at IETF 90.
 End of changes. 83 change blocks. 
217 lines changed or deleted 606 lines changed or added

This html diff was produced by rfcdiff 1.42. The latest version is available from http://tools.ietf.org/tools/rfcdiff/