draft-ietf-rtcweb-jsep-15.txt   draft-ietf-rtcweb-jsep-16.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: January 8, 2017 Cisco Expires: March 24, 2017 Cisco
E. Rescorla, Ed. E. Rescorla, Ed.
Mozilla Mozilla
July 7, 2016 September 20, 2016
Javascript Session Establishment Protocol Javascript Session Establishment Protocol
draft-ietf-rtcweb-jsep-15 draft-ietf-rtcweb-jsep-16
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 January 8, 2017. This Internet-Draft will expire on March 24, 2017.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2016 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
skipping to change at page 2, line 28 skipping to change at page 2, line 28
3.4.1. RtpTransceivers . . . . . . . . . . . . . . . . . . . 10 3.4.1. RtpTransceivers . . . . . . . . . . . . . . . . . . . 10
3.4.2. RtpSenders . . . . . . . . . . . . . . . . . . . . . 11 3.4.2. RtpSenders . . . . . . . . . . . . . . . . . . . . . 11
3.4.3. RtpReceivers . . . . . . . . . . . . . . . . . . . . 11 3.4.3. RtpReceivers . . . . . . . . . . . . . . . . . . . . 11
3.5. ICE . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.5. ICE . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.5.1. ICE Gathering Overview . . . . . . . . . . . . . . . 11 3.5.1. ICE Gathering Overview . . . . . . . . . . . . . . . 11
3.5.2. ICE Candidate Trickling . . . . . . . . . . . . . . . 12 3.5.2. ICE Candidate Trickling . . . . . . . . . . . . . . . 12
3.5.2.1. ICE Candidate Format . . . . . . . . . . . . . . 12 3.5.2.1. ICE Candidate Format . . . . . . . . . . . . . . 12
3.5.3. ICE Candidate Policy . . . . . . . . . . . . . . . . 13 3.5.3. ICE Candidate Policy . . . . . . . . . . . . . . . . 13
3.5.4. ICE Candidate Pool . . . . . . . . . . . . . . . . . 14 3.5.4. ICE Candidate Pool . . . . . . . . . . . . . . . . . 14
3.6. Video Size Negotiation . . . . . . . . . . . . . . . . . 14 3.6. Video Size Negotiation . . . . . . . . . . . . . . . . . 14
3.6.1. Creating an imageattr Attribute . . . . . . . . . . . 14 3.6.1. Creating an imageattr Attribute . . . . . . . . . . . 15
3.6.2. Interpreting an imageattr Attribute . . . . . . . . . 16 3.6.2. Interpreting an imageattr Attribute . . . . . . . . . 16
3.7. Interactions With Forking . . . . . . . . . . . . . . . . 17 3.7. Simulcast . . . . . . . . . . . . . . . . . . . . . . . . 17
3.7.1. Sequential Forking . . . . . . . . . . . . . . . . . 17 3.8. Interactions With Forking . . . . . . . . . . . . . . . . 18
3.7.2. Parallel Forking . . . . . . . . . . . . . . . . . . 18 3.8.1. Sequential Forking . . . . . . . . . . . . . . . . . 18
4. Interface . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.8.2. Parallel Forking . . . . . . . . . . . . . . . . . . 19
4.1. Methods . . . . . . . . . . . . . . . . . . . . . . . . . 19 4. Interface . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.1.1. Constructor . . . . . . . . . . . . . . . . . . . . . 19 4.1. Methods . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.1.2. addTrack . . . . . . . . . . . . . . . . . . . . . . 21 4.1.1. Constructor . . . . . . . . . . . . . . . . . . . . . 20
4.1.3. addTransceiver . . . . . . . . . . . . . . . . . . . 21 4.1.2. addTrack . . . . . . . . . . . . . . . . . . . . . . 22
4.1.4. createDataChannel . . . . . . . . . . . . . . . . . . 21 4.1.3. addTransceiver . . . . . . . . . . . . . . . . . . . 22
4.1.5. createOffer . . . . . . . . . . . . . . . . . . . . . 21 4.1.4. createDataChannel . . . . . . . . . . . . . . . . . . 22
4.1.6. createAnswer . . . . . . . . . . . . . . . . . . . . 22 4.1.5. createOffer . . . . . . . . . . . . . . . . . . . . . 23
4.1.7. SessionDescriptionType . . . . . . . . . . . . . . . 23 4.1.6. createAnswer . . . . . . . . . . . . . . . . . . . . 24
4.1.7.1. Use of Provisional Answers . . . . . . . . . . . 24 4.1.7. SessionDescriptionType . . . . . . . . . . . . . . . 24
4.1.7.2. Rollback . . . . . . . . . . . . . . . . . . . . 24 4.1.7.1. Use of Provisional Answers . . . . . . . . . . . 25
4.1.8. setLocalDescription . . . . . . . . . . . . . . . . . 25 4.1.7.2. Rollback . . . . . . . . . . . . . . . . . . . . 26
4.1.9. setRemoteDescription . . . . . . . . . . . . . . . . 26 4.1.8. setLocalDescription . . . . . . . . . . . . . . . . . 27
4.1.10. currentLocalDescription . . . . . . . . . . . . . . . 26 4.1.9. setRemoteDescription . . . . . . . . . . . . . . . . 28
4.1.11. pendingLocalDescription . . . . . . . . . . . . . . . 27 4.1.10. currentLocalDescription . . . . . . . . . . . . . . . 28
4.1.12. currentRemoteDescription . . . . . . . . . . . . . . 27 4.1.11. pendingLocalDescription . . . . . . . . . . . . . . . 28
4.1.13. pendingRemoteDescription . . . . . . . . . . . . . . 27 4.1.12. currentRemoteDescription . . . . . . . . . . . . . . 28
4.1.14. canTrickleIceCandidates . . . . . . . . . . . . . . . 27 4.1.13. pendingRemoteDescription . . . . . . . . . . . . . . 29
4.1.15. setConfiguration . . . . . . . . . . . . . . . . . . 28 4.1.14. canTrickleIceCandidates . . . . . . . . . . . . . . . 29
4.1.16. addIceCandidate . . . . . . . . . . . . . . . . . . . 29 4.1.15. setConfiguration . . . . . . . . . . . . . . . . . . 29
5. SDP Interaction Procedures . . . . . . . . . . . . . . . . . 29 4.1.16. addIceCandidate . . . . . . . . . . . . . . . . . . . 30
5.1. Requirements Overview . . . . . . . . . . . . . . . . . . 29 5. SDP Interaction Procedures . . . . . . . . . . . . . . . . . 31
5.1.1. Implementation Requirements . . . . . . . . . . . . . 29 5.1. Requirements Overview . . . . . . . . . . . . . . . . . . 31
5.1.2. Usage Requirements . . . . . . . . . . . . . . . . . 31 5.1.1. Implementation Requirements . . . . . . . . . . . . . 31
5.1.3. Profile Names and Interoperability . . . . . . . . . 31 5.1.2. Usage Requirements . . . . . . . . . . . . . . . . . 33
5.2. Constructing an Offer . . . . . . . . . . . . . . . . . . 32 5.1.3. Profile Names and Interoperability . . . . . . . . . 33
5.2.1. Initial Offers . . . . . . . . . . . . . . . . . . . 32 5.2. Constructing an Offer . . . . . . . . . . . . . . . . . . 34
5.2.2. Subsequent Offers . . . . . . . . . . . . . . . . . . 38 5.2.1. Initial Offers . . . . . . . . . . . . . . . . . . . 34
5.2.3. Options Handling . . . . . . . . . . . . . . . . . . 41 5.2.2. Subsequent Offers . . . . . . . . . . . . . . . . . . 40
5.2.3.1. IceRestart . . . . . . . . . . . . . . . . . . . 41 5.2.3. Options Handling . . . . . . . . . . . . . . . . . . 43
5.2.3.2. VoiceActivityDetection . . . . . . . . . . . . . 41 5.2.3.1. IceRestart . . . . . . . . . . . . . . . . . . . 43
5.2.4. Direction Attribute in Offers . . . . . . . . . . . . 42 5.2.3.2. VoiceActivityDetection . . . . . . . . . . . . . 44
5.3. Generating an Answer . . . . . . . . . . . . . . . . . . 42 5.3. Generating an Answer . . . . . . . . . . . . . . . . . . 44
5.3.1. Initial Answers . . . . . . . . . . . . . . . . . . . 42 5.3.1. Initial Answers . . . . . . . . . . . . . . . . . . . 44
5.3.2. Subsequent Answers . . . . . . . . . . . . . . . . . 47 5.3.2. Subsequent Answers . . . . . . . . . . . . . . . . . 49
5.3.3. Options Handling . . . . . . . . . . . . . . . . . . 48 5.3.3. Options Handling . . . . . . . . . . . . . . . . . . 50
5.3.3.1. VoiceActivityDetection . . . . . . . . . . . . . 48 5.3.3.1. VoiceActivityDetection . . . . . . . . . . . . . 50
5.3.4. Direction Attribute in Answers . . . . . . . . . . . 48 5.4. Modifying an Offer or Answer . . . . . . . . . . . . . . 50
5.4. Processing a Local Description . . . . . . . . . . . . . 49 5.5. Processing a Local Description . . . . . . . . . . . . . 51
5.5. Processing a Remote Description . . . . . . . . . . . . . 49 5.6. Processing a Remote Description . . . . . . . . . . . . . 51
5.6. Parsing a Session Description . . . . . . . . . . . . . . 50 5.7. Parsing a Session Description . . . . . . . . . . . . . . 52
5.6.1. Session-Level Parsing . . . . . . . . . . . . . . . . 51 5.7.1. Session-Level Parsing . . . . . . . . . . . . . . . . 53
5.6.2. Media Section Parsing . . . . . . . . . . . . . . . . 53 5.7.2. Media Section Parsing . . . . . . . . . . . . . . . . 55
5.6.3. Semantics Verification . . . . . . . . . . . . . . . 55 5.7.3. Semantics Verification . . . . . . . . . . . . . . . 57
5.7. Applying a Local Description . . . . . . . . . . . . . . 56 5.8. Applying a Local Description . . . . . . . . . . . . . . 58
5.8. Applying a Remote Description . . . . . . . . . . . . . . 58 5.9. Applying a Remote Description . . . . . . . . . . . . . . 60
5.9. Applying an Answer . . . . . . . . . . . . . . . . . . . 60 5.10. Applying an Answer . . . . . . . . . . . . . . . . . . . 63
6. Configurable SDP Parameters . . . . . . . . . . . . . . . . . 62 6. Demux placeholder . . . . . . . . . . . . . . . . . . . . . . 64
7. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 63 7. Processing RTP packets . . . . . . . . . . . . . . . . . . . 64
7.1. Simple Example . . . . . . . . . . . . . . . . . . . . . 63 8. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 66
7.2. Normal Examples . . . . . . . . . . . . . . . . . . . . . 67 8.1. Simple Example . . . . . . . . . . . . . . . . . . . . . 66
8. Security Considerations . . . . . . . . . . . . . . . . . . . 77 8.2. Normal Examples . . . . . . . . . . . . . . . . . . . . . 70
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 77 9. Security Considerations . . . . . . . . . . . . . . . . . . . 80
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 78 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 80
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 78 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 81
11.1. Normative References . . . . . . . . . . . . . . . . . . 78 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 81
11.2. Informative References . . . . . . . . . . . . . . . . . 81 12.1. Normative References . . . . . . . . . . . . . . . . . . 81
Appendix A. Change log . . . . . . . . . . . . . . . . . . . . . 82 12.2. Informative References . . . . . . . . . . . . . . . . . 84
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 87 Appendix A. Change log . . . . . . . . . . . . . . . . . . . . . 85
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 91
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 13, line 14 skipping to change at page 13, line 14
candidate:1 1 UDP 1694498815 192.0.2.33 10000 typ host candidate:1 1 UDP 1694498815 192.0.2.33 10000 typ host
The IceCandidate object also contains fields to indicate which m= The IceCandidate object also contains fields to indicate which m=
line it should be associated with. The m= line can be identified in line it should be associated with. The m= line can be identified in
one of two ways; either by a m= line index, or a MID. The m= line one of two ways; either by a m= line index, or a MID. The m= line
index is a zero-based index, with index N referring to the N+1th m= index is a zero-based index, with index N referring to the N+1th m=
line in the SDP sent by the entity which sent the IceCandidate. The line in the SDP sent by the entity which sent the IceCandidate. The
MID uses the "media stream identification" attribute, as defined in MID uses the "media stream identification" attribute, as defined in
[RFC5888], Section 4, to identify the m= line. JSEP implementations [RFC5888], Section 4, to identify the m= line. JSEP implementations
creating an ICE Candidate object MUST populate both of these fields. creating an ICE Candidate object MUST populate both of these fields,
Implementations receiving an ICE Candidate object MUST use the MID if using the MID of the associated RtpTransceiver object (which may be
present, or the m= line index, if not (as it could have come from a locally generated by the answerer when interacting with a non-JSEP
non-JSEP endpoint). remote endpoint that does not support the MID attribute, as discussed
in Section 5.9 below). Implementations receiving an ICE Candidate
object MUST use the MID if present, or the m= line index, if not (the
non-JSEP remote endpoint case).
3.5.3. ICE Candidate Policy 3.5.3. ICE Candidate Policy
Typically, when gathering ICE candidates, the browser will gather all Typically, when gathering ICE candidates, the browser will gather all
possible forms of initial candidates - host, server reflexive, and possible forms of initial candidates - host, server reflexive, and
relay. However, in certain cases, applications may want to have more relay. However, in certain cases, applications may want to have more
specific control over the gathering process, due to privacy or specific control over the gathering process, due to privacy or
related concerns. For example, one may want to suppress the use of related concerns. For example, one may want to suppress the use of
host candidates, to avoid exposing information about the local host candidates, to avoid exposing information about the local
network, or go as far as only using relay candidates, to leak as network, or go as far as only using relay candidates, to leak as
skipping to change at page 17, line 12 skipping to change at page 17, line 12
upscaling. The sender SHOULD NOT upscale in other cases, even if the upscaling. The sender SHOULD NOT upscale in other cases, even if the
policy permits it. Upscaling MUST NOT change the track aspect ratio. policy permits it. Upscaling MUST NOT change the track aspect ratio.
If there is no appropriate and permitted scaling mechanism that If there is no appropriate and permitted scaling mechanism that
allows the received size limits to be satisfied, the sender MUST NOT allows the received size limits to be satisfied, the sender MUST NOT
transmit the track. transmit the track.
In the special case of receiving a maximum resolution of [0, 0], as In the special case of receiving a maximum resolution of [0, 0], as
described above, the sender MUST NOT transmit the track. described above, the sender MUST NOT transmit the track.
3.7. Interactions With Forking 3.7. Simulcast
JSEP supports simulcast of a MediaStreamTrack, where multiple
encodings of the source media can be transmitted within the context
of a single m= section. The current JSEP API is designed to allow
applications to send simulcasted media but only to receive a single
encoding. This allows for multi-user scenarios where each sending
client sends multiple encodings to a server, which then, for each
receiving client, chooses the appropriate encoding to forward.
Applications request support for simulcast by configuring multiple
encodings on an RTPSender, which, upon generation of an offer or
answer, are indicated in SDP markings on the corresponding m=
section, as described below. Receivers that understand simulcast and
are willing to receive it will also include SDP markings to indicate
their support, and JSEP endpoints will use these markings to
determine whether simulcast is permitted for a given RTPSender. If
simulcast support is not negotiated, the RTPSender will only use the
first configured encoding.
Note that the exact simulcast parameters are up to the sending
application. While the aforementioned SDP markings are provided to
ensure the remote side can receive and demux multiple simulcast
encodings, the specific resolutions and bitrates to be used for each
encoding are purely a send-side decision in JSEP.
JSEP currently does not provide an API to configure receipt of
simulcast. This means that if simulcast is offered by the remote
endpoint, the answer generated by a JSEP endpoint will not indicate
support for receipt of simulcast, and as such the remote endpoint
will only send a single encoding per m= section. In addition, when
the JSEP endpoint is the answerer, the permitted encodings for the
RTPSender must be consistent with the offer, but this information is
currently not surfaced through any API. This means that established
simulcast streams will continue to work through a received re-offer,
but setting up initial simulcast by way of a received offer requires
out-of-band signaling or SDP inspection. Future versions of this
specification may add additional APIs to provide this control.
When using JSEP to transmit multiple encodings from a RTPSender, the
techniques from [I-D.ietf-mmusic-sdp-simulcast] and
[I-D.ietf-mmusic-rid] are used. Specifically, when multiple
encodings have been configured for a RTPSender, the m= section for
the RTPSender will include an "a=simulcast" attribute, as defined in
[I-D.ietf-mmusic-sdp-simulcast], Section 6.2, with a "send" simulcast
stream description that lists each desired encoding, and no "recv"
simulcast stream description. The m= section will also include an
"a=rid" attribute for each encoding, as specfied in
[I-D.ietf-mmusic-rid], Section 4; the use of RID identifiers allows
the individual encodings to be disambiguated even though they are all
part of the same m= section.
3.8. Interactions With Forking
Some call signaling systems allow various types of forking where an Some call signaling systems allow various types of forking where an
SDP Offer may be provided to more than one device. For example, SIP SDP Offer may be provided to more than one device. For example, SIP
[RFC3261] defines both a "Parallel Search" and "Sequential Search". [RFC3261] defines both a "Parallel Search" and "Sequential Search".
Although these are primarily signaling level issues that are outside Although these are primarily signaling level issues that are outside
the scope of JSEP, they do have some impact on the configuration of the scope of JSEP, they do have some impact on the configuration of
the media plane that is relevant. When forking happens at the the media plane that is relevant. When forking happens at the
signaling layer, the Javascript application responsible for the signaling layer, the Javascript application responsible for the
signaling needs to make the decisions about what media should be sent signaling needs to make the decisions about what media should be sent
or received at any point of time, as well as which remote endpoint it or received at any point of time, as well as which remote endpoint it
skipping to change at page 17, line 34 skipping to change at page 18, line 38
can make the RTP and media perform as required by the application. can make the RTP and media perform as required by the application.
The basic operations that the applications can have the media engine The basic operations that the applications can have the media engine
do are: do are:
o Start exchanging media with a given remote peer, but keep all the o Start exchanging media with a given remote peer, but keep all the
resources reserved in the offer. resources reserved in the offer.
o Start exchanging media with a given remote peer, and free any o Start exchanging media with a given remote peer, and free any
resources in the offer that are not being used. resources in the offer that are not being used.
3.7.1. Sequential Forking 3.8.1. Sequential Forking
Sequential forking involves a call being dispatched to multiple Sequential forking involves a call being dispatched to multiple
remote callees, where each callee can accept the call, but only one remote callees, where each callee can accept the call, but only one
active session ever exists at a time; no mixing of received media is active session ever exists at a time; no mixing of received media is
performed. performed.
JSEP handles sequential forking well, allowing the application to JSEP handles sequential forking well, allowing the application to
easily control the policy for selecting the desired remote endpoint. easily control the policy for selecting the desired remote endpoint.
When an answer arrives from one of the callees, the application can When an answer arrives from one of the callees, the application can
choose to apply it either as a provisional answer, leaving open the choose to apply it either as a provisional answer, leaving open the
skipping to change at page 18, line 11 skipping to change at page 19, line 15
In a "first-one-wins" situation, the first answer will be applied as In a "first-one-wins" situation, the first answer will be applied as
a final answer, and the application will reject any subsequent a final answer, and the application will reject any subsequent
answers. In SIP parlance, this would be ACK + BYE. answers. In SIP parlance, this would be ACK + BYE.
In a "last-one-wins" situation, all answers would be applied as In a "last-one-wins" situation, all answers would be applied as
provisional answers, and any previous call leg will be terminated. provisional answers, and any previous call leg will be terminated.
At some point, the application will end the setup process, perhaps At some point, the application will end the setup process, perhaps
with a timer; at this point, the application could reapply the with a timer; at this point, the application could reapply the
pending remote description as a final answer. pending remote description as a final answer.
3.7.2. Parallel Forking 3.8.2. Parallel Forking
Parallel forking involves a call being dispatched to multiple remote Parallel forking involves a call being dispatched to multiple remote
callees, where each callee can accept the call, and multiple callees, where each callee can accept the call, and multiple
simultaneous active signaling sessions can be established as a simultaneous active signaling sessions can be established as a
result. If multiple callees send media at the same time, the result. If multiple callees send media at the same time, the
possibilities for handling this are described in Section 3.1 of possibilities for handling this are described in Section 3.1 of
[RFC3960]. Most SIP devices today only support exchanging media with [RFC3960]. Most SIP devices today only support exchanging media with
a single device at a time, and do not try to mix multiple early media a single device at a time, and do not try to mix multiple early media
audio sources, as that could result in a confusing situation. For audio sources, as that could result in a confusing situation. For
example, consider having a European ringback tone mixed together with example, consider having a European ringback tone mixed together with
skipping to change at page 20, line 37 skipping to change at page 21, line 37
max-compat: All media sections will contain transport parameters; max-compat: All media sections will contain transport parameters;
none will be marked as bundle-only. This policy will allow all none will be marked as bundle-only. This policy will allow all
streams to be received by non-bundle-aware endpoints, but require streams to be received by non-bundle-aware endpoints, but require
separate candidates to be gathered for each media stream. separate candidates to be gathered for each media stream.
max-bundle: Only the first media section will contain transport max-bundle: Only the first media section will contain transport
parameters; all streams other than the first will be marked as parameters; all streams other than the first will be marked as
bundle-only. This policy aims to minimize candidate gathering and bundle-only. This policy aims to minimize candidate gathering and
maximize multiplexing, at the cost of less compatibility with maximize multiplexing, at the cost of less compatibility with
legacy endpoints. When acting as answerer, if there if no bundle legacy endpoints. When acting as answerer, the implementation
group in the offer, the implementation will reject all but the will reject any m= sections other than the first m= section,
first m= section. unless they are in the same bundle group as that m= section.
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 The application can specify its preferred policy regarding use of
RTP/RTCP multiplexing [RFC5761] using one of the following policies: RTP/RTCP multiplexing [RFC5761] using one of the following policies:
negotiate: The browser will gather both RTP and RTCP candidates but negotiate: The browser will gather both RTP and RTCP candidates but
also will offer "a=rtcp-mux", thus allowing for compatibility with also will offer "a=rtcp-mux", thus allowing for compatibility with
skipping to change at page 21, line 32 skipping to change at page 22, line 32
tracks in the same MediaStream, so that they can be added to the same tracks in the same MediaStream, so that they can be added to the same
"LS" group when creating an offer or answer. addTrack attempts to "LS" group when creating an offer or answer. addTrack attempts to
minimize the number of transceivers as follows: The track will be minimize the number of transceivers as follows: The track will be
attached to the first compatible transceiver (of the same media type) attached to the first compatible transceiver (of the same media type)
which has never had a direction of "sendonly" or "sendrecv". If no which has never had a direction of "sendonly" or "sendrecv". If no
such transceiver exists, then one will be constructed as described in such transceiver exists, then one will be constructed as described in
Section 4.1.3. Section 4.1.3.
4.1.3. addTransceiver 4.1.3. addTransceiver
[TODO] The addTransceiver method adds a new RTPTransceiver to the
PeerConnection. If a MediaStreamTrack argument is provided, then the
transceiver will be configured with that media type and the track
will be attached to the transceiver. Otherwise, the application MUST
explicitly specify the type; this mode is useful for creating
recvonly transceivers as well as for creating transceivers to which a
track can be attached at some later point.
At the time of creation, the application can also specify a
transceiver direction attribute, a set of MediaStreams which the
transceiver is associated with (allowing LS group assignments), and a
set of encodings for the media (used for simulcast as described in
Section 3.7).
4.1.4. createDataChannel 4.1.4. createDataChannel
[TODO] The createDataChannel method creates a new data channel and attaches
it to the PeerConnection. If no data channel currently exists for
this PeerConnection, then a new offer/answer exchange is required.
All data channels on a given PeerConnection share the same SCTP/DTLS
association and therefore the same m= section, so subsequent creation
of data channels does not have any impact on the JSEP state.
The createDataChannel method also includes a number of arguments
which are used by the PeerConnection (e.g., maxPacketLifetime) but
are not reflected in the SDP and do not affect the JSEP state.
4.1.5. createOffer 4.1.5. 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 media added to this PeerConnection, the including descriptions of the media added to this PeerConnection, the
codec/RTP/RTCP options supported by this implementation, and any codec/RTP/RTCP options supported by this implementation, and any
candidates that have been gathered by the ICE Agent. An options candidates that have been gathered by the ICE Agent. An options
parameter may be supplied to provide additional control over the parameter may be supplied to provide additional control over the
generated offer. This options parameter allows an application to generated offer. This options parameter allows an application to
skipping to change at page 24, line 10 skipping to change at page 25, line 33
can use some discretion on whether an answer should be applied as can use some discretion on whether an answer should be applied as
provisional or final, and can change the type of the session provisional or final, and can change the type of the session
description as needed. For example, in a serial forking scenario, an description as needed. For example, in a serial forking scenario, an
application may receive multiple "final" answers, one from each application may receive multiple "final" answers, one from each
remote endpoint. The application could choose to accept the initial remote endpoint. The application could choose to accept the initial
answers as provisional answers, and only apply an answer as final answers as provisional answers, and only apply an answer as final
when it receives one that meets its criteria (e.g. a live user when it receives one that meets its criteria (e.g. a live user
instead of voicemail). instead of voicemail).
"rollback" is a special session description type implying that the "rollback" is a special session description type implying that the
state machine should be rolled back to the previous state, as state machine should be rolled back to the previous stable state, as
described in Section 4.1.7.2. The contents MUST be empty. described in Section 4.1.7.2. The contents MUST be empty.
4.1.7.1. Use of Provisional Answers 4.1.7.1. Use of Provisional Answers
Most web applications will not need to create answers using the Most web applications will not need to create answers using the
"pranswer" type. While it is good practice to send an immediate "pranswer" type. While it is good practice to send an immediate
response to an "offer", in order to warm up the session transport and response to an "offer", in order to warm up the session transport and
prevent media clipping, the preferred handling for a web application prevent media clipping, the preferred handling for a web application
would be to create and send an "inactive" final answer immediately would be to create and send an "inactive" final answer immediately
after receiving the offer. Later, when the called user actually after receiving the offer. Later, when the called user actually
skipping to change at page 25, line 23 skipping to change at page 26, line 48
that were allocated by the abandoned local description are discarded; that were allocated by the abandoned local description are discarded;
any media that is received will be processed according to the any media that is received will be processed according to the
previous local and remote descriptions. Rollback can only be used to previous local and remote descriptions. Rollback can only be used to
cancel proposed changes; there is no support for rolling back from a cancel proposed changes; there is no support for rolling back from a
stable state to a previous stable state. Note that this implies that stable state to a previous stable state. Note that this implies that
once the answerer has performed setLocalDescription with his answer, once the answerer has performed setLocalDescription with his answer,
this cannot be rolled back. this cannot be rolled back.
A rollback will disassociate any RtpTransceivers that were associated A rollback will disassociate any RtpTransceivers that were associated
with m= sections by the application of the rolled-back session with m= sections by the application of the rolled-back session
description (see Section 5.8 and Section 5.7). This means that some description (see Section 5.9 and Section 5.8). This means that some
RtpTransceivers that were previously associated will no longer be RtpTransceivers that were previously associated will no longer be
associated with any m= section; in such cases, the value of the associated with any m= section; in such cases, the value of the
RtpTransceiver's mid attribute MUST be set to null. RtpTransceivers RtpTransceiver's mid attribute MUST be set to null. RtpTransceivers
that were created by applying a remote offer that was subsequently that were created by applying a remote offer that was subsequently
rolled back MUST be removed. However, a RtpTransceiver MUST NOT be rolled back MUST be removed. However, a RtpTransceiver MUST NOT be
removed if the RtpTransceiver's RtpSender was activated by the removed if the RtpTransceiver's RtpSender was activated by the
addTrack method. This is so that an application may call addTrack, addTrack method. This is so that an application may call addTrack,
then call setRemoteDescription with an offer, then roll back that then call setRemoteDescription with an offer, then roll back that
offer, then call createOffer and have a m= section for the added offer, then call createOffer and have a m= section for the added
track appear in the generated offer. track appear in the generated offer.
skipping to change at page 29, line 10 skipping to change at page 30, line 39
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.16. addIceCandidate 4.1.16. 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 current Agent, which, if parsed successfully, will be added to the current
and/or pending remote description according to the rules defined for and/or pending remote description according to the rules defined for
Trickle ICE. If the MID, m-line index, or candidate string provided Trickle ICE. The pair of MID and ufrag is used to determine the m=
in the ICE candidate is invalid, an error is generated. Connectivity section and ICE candidate generation to which the candidate belongs.
checks will be sent to the new candidate. If the MID is not present, the m= line index is used to look up the
locally generated MID (see Section 5.9), which is used in place of a
supplied MID. If these values or the candidate string are invalid,
an error is generated.
The purpose of the ufrag is to resolve ambiguities when trickle ICE
is in progress during an ICE restart. If the ufrag is absent, the
candidate MUST be assumed to belong to the most recently applied
remote description. Connectivity checks will be sent to the new
candidate.
This method can also be used to provide an end-of-candidates This method can also be used to provide an end-of-candidates
indication (as defined in [I-D.ietf-ice-trickle]) to the ICE Agent indication to the ICE Agent, as defined in [I-D.ietf-ice-trickle]).
for all media descriptions in the last remote description. The MID and ufrag are used as described above to determine the m=
section and ICE generation for which candidate gathering is complete.
If the ufrag is not present, then the end-of-candidates indication
MUST be assumed to apply to the relevant m= section in the most
recently applied remote description. If neither the MID nor the m=
index is present, then the indication MUST be assumed to apply to all
m= sections in the most recently applied remote description.
This call will result in a change to the state of the ICE Agent, and This call will 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.
5. SDP Interaction Procedures 5. SDP Interaction Procedures
This section describes the specific procedures to be followed when This section describes the specific procedures to be followed when
creating and parsing SDP objects. creating and parsing SDP objects.
skipping to change at page 32, line 45 skipping to change at page 34, line 40
The first step in generating an initial offer is to generate session- The first step in generating an initial offer is to generate session-
level attributes, as specified in [RFC4566], Section 5. level attributes, as specified in [RFC4566], Section 5.
Specifically: Specifically:
o The first SDP line MUST be "v=0", as specified in [RFC4566], o The first SDP line MUST be "v=0", as specified in [RFC4566],
Section 5.1 Section 5.1
o The second SDP line MUST be an "o=" line, as specified in o The second SDP line MUST be an "o=" line, as specified in
[RFC4566], Section 5.2. The value of the <username> field SHOULD [RFC4566], Section 5.2. The value of the <username> field SHOULD
be "-". The value of the <sess-id> field SHOULD be a be "-". [RFC3264] requires that the <sess-id> be representable as
cryptographically random number. To ensure uniqueness, this a 64-bit signed integer. It is RECOMMENDED that the <sess-id> be
number SHOULD be at least 64 bits long. The value of the <sess- generated as a 64-bit quantity with the high bit being sent to
version> field SHOULD be zero. The value of the <nettype> zero and the remaining 63 bits being cryptographically random.
<addrtype> <unicast-address> tuple SHOULD be set to a non- The value of the <nettype> <addrtype> <unicast-address> tuple
meaningful address, such as IN IP4 0.0.0.0, to prevent leaking the SHOULD be set to a non-meaningful address, such as IN IP4 0.0.0.0,
local address in this field. As mentioned in [RFC4566], the to prevent leaking the local address in this field. As mentioned
entire o= line needs to be unique, but selecting a random number in [RFC4566], the entire o= line needs to be unique, but selecting
for <sess-id> is sufficient to accomplish this. a random number for <sess-id> is sufficient to accomplish this.
o The third SDP line MUST be a "s=" line, as specified in [RFC4566], o The third SDP line MUST be a "s=" line, as specified in [RFC4566],
Section 5.3; to match the "o=" line, a single dash SHOULD be used Section 5.3; to match the "o=" line, a single dash SHOULD be used
as the session name, e.g. "s=-". Note that this differs from the as the session name, e.g. "s=-". Note that this differs from the
advice in [RFC4566] which proposes a single space, but as both advice in [RFC4566] which proposes a single space, but as both
"o=" and "s=" are meaningless, having the same meaningless value "o=" and "s=" are meaningless, having the same meaningless value
seems clearer. seems clearer.
o Session Information ("i="), URI ("u="), Email Address ("e="), o Session Information ("i="), URI ("u="), Email Address ("e="),
Phone Number ("p="), Bandwidth ("b="), Repeat Times ("r="), and Phone Number ("p="), Bandwidth ("b="), Repeat Times ("r="), and
skipping to change at page 33, line 31 skipping to change at page 35, line 25
o A "t=" line MUST be added, as specified in [RFC4566], Section 5.9; o A "t=" line MUST be added, as specified in [RFC4566], Section 5.9;
both <start-time> and <stop-time> SHOULD be set to zero, e.g. "t=0 both <start-time> and <stop-time> SHOULD be set to zero, e.g. "t=0
0". 0".
o An "a=ice-options" line with the "trickle" option MUST be added, o An "a=ice-options" line with the "trickle" option MUST be added,
as specified in [I-D.ietf-ice-trickle], Section 4. as specified in [I-D.ietf-ice-trickle], Section 4.
The next step is to generate m= sections, as specified in [RFC4566] The next step is to generate m= sections, as specified in [RFC4566]
Section 5.14. An m= section is generated for each RtpTransceiver Section 5.14. An m= section is generated for each RtpTransceiver
that has been added to the PeerConnection via the addTrack, that has been added to the PeerConnection. This is done in the order
addTransceiver, and setRemoteDescription methods. [[OPEN ISSUE: move that their associated RtpTransceivers were added to the
discussion of setRemoteDescription to the subsequent-offer section.]] PeerConnection and excludes RtpTransceivers that are stopped and not
This is done in the order that their associated RtpTransceivers were associated with an m= section (either due to an m= section being
added to the PeerConnection and excludes RtpTranscievers that are recycled or an RtpTransceiver having been stopped before being
stopped and not associated with an m= section (either due to an m= associated with an m= section) .
section being recycled or an RtpTransceiver having been stopped
before being associated with an m= section) .
Each m= section, provided it is not marked as bundle-only, MUST Each m= section, provided it is not marked as bundle-only, MUST
generate a unique set of ICE credentials and gather its own unique generate a unique set of ICE credentials and gather its own unique
set of ICE candidates. Bundle-only m= sections MUST NOT contain any set of ICE candidates. Bundle-only m= sections MUST NOT contain any
ICE credentials and MUST NOT gather any candidates. ICE credentials and MUST NOT gather any candidates.
For DTLS, all m= sections MUST use the certificate for the identity For DTLS, all m= sections MUST use all the certificate(s) that have
that has been specified for the PeerConnection; as a result, they been specified for the PeerConnection; as a result, they MUST all
MUST all have the same [RFC4572] fingerprint value, or this value have the same [I-D.ietf-mmusic-4572-update] fingerprint value(s), or
MUST be a session-level attribute. these value(s) MUST be session-level attributes.
Each m= section should be generated as specified in [RFC4566], Each m= section should be generated as specified in [RFC4566],
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-ice-trickle], Section 5.1. indicated in [I-D.ietf-ice-trickle], Section 5.1.
skipping to change at page 34, line 37 skipping to change at page 36, line 28
o An "a=mid" line, as specified in [RFC5888], Section 4. When o An "a=mid" line, as specified in [RFC5888], Section 4. When
generating mid values, it is RECOMMENDED that the values be 3 generating mid values, it is RECOMMENDED that the values be 3
bytes or less, to allow them to efficiently fit into the RTP bytes or less, to allow them to efficiently fit into the RTP
header extension defined in header extension defined in
[I-D.ietf-mmusic-sdp-bundle-negotiation], Section 11. [I-D.ietf-mmusic-sdp-bundle-negotiation], Section 11.
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 IP4 0.0.0.0", because no containing the dummy value "9 IN IP4 0.0.0.0", because no
candidates have yet been gathered. candidates have yet been gathered.
o A direction attribute for the associated RtpTransceiver as o A direction attribute which is the same as that of the associated
described by Section 5.2.4. transceiver.
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. The audio and video codecs specified in [RFC4566], Section 6. The audio and video codecs
that MUST be supported are specified in that MUST be supported are specified in
[I-D.ietf-rtcweb-audio](see Section 3) and [I-D.ietf-rtcweb-audio](see Section 3) and
[I-D.ietf-rtcweb-video](see Section 5). [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
skipping to change at page 35, line 24 skipping to change at page 37, line 14
o For each supported FEC mechanism, "a=rtpmap" and "a=fmtp" lines, o For each supported FEC mechanism, "a=rtpmap" and "a=fmtp" lines,
as specified in [RFC4566], Section 6. The FEC mechanisms that as specified in [RFC4566], Section 6. The FEC mechanisms that
MUST be supported are specified in [I-D.ietf-rtcweb-fec], MUST be supported are specified in [I-D.ietf-rtcweb-fec],
Section 6, and specific usage for each media type is outlined in Section 6, and specific usage for each media type is outlined in
Sections 4 and 5. Sections 4 and 5.
o "a=ice-ufrag" and "a=ice-pwd" lines, as specified in [RFC5245], o "a=ice-ufrag" and "a=ice-pwd" lines, as specified in [RFC5245],
Section 15.4. Section 15.4.
o An "a=fingerprint" line for each of the endpoint's certificates, o One or more "a=fingerprint" line(s) for each of the endpoint's
as specified in [RFC4572], Section 5; the digest algorithm used certificates, as specified in [I-D.ietf-mmusic-4572-update].
for the fingerprint MUST match that used in the 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 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-mux-only" line, as specified in
[I-D.ietf-mmusic-mux-exclusive] Section 4, if and only if the RTP/
RTCP multiplexing policy is "require".
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. Any header extensions [I-D.ietf-rtcweb-rtp-usage], Section 5.2. Any header extensions
that require encryption MUST be specified as indicated in that require encryption MUST be specified as indicated in
[RFC6904], Section 4. [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"
skipping to change at page 38, line 37 skipping to change at page 40, line 29
When createOffer is called a second (or later) time, or is called When createOffer is called a second (or later) time, or is called
after a local description has already been installed, the processing after a local description has already been installed, the processing
is somewhat different than for an initial offer. is somewhat different than for an initial offer.
If the initial offer was not applied using setLocalDescription, If the initial offer was not applied using setLocalDescription,
meaning the PeerConnection is still in the "stable" state, the steps meaning the PeerConnection is still in the "stable" state, the steps
for generating an initial offer should be followed, subject to the for generating an initial offer should be followed, subject to the
following restriction: following restriction:
o The fields of the "o=" line MUST stay the same except for the o The fields of the "o=" line MUST stay the same except for the
<session-version> field, which MUST increment if the session <session-version> field, which MUST increment by one on each call
description changes in any way, including the addition of ICE to createOffer if the offer might differ from the output of the
candidates. previous call to createOffer; implementations MAY opt to increment
<session-version> on every call. The value of the generated
<session-version> is independent of the <session-version> of the
current local description; in particular, in the case where the
current version is N, an offer is created with version N+1, and
then that offer is rolled back so that the current version is
again N, the next generated offer will still have version N+2.
Note that if the application creates an offer by reading
currentLocalDescription instead of calling createOffer, the returned
SDP may be different than when setLocalDescription was originally
called, due to the addition of gathered ICE candidates, but the
<session-version> will not have changed. There are no known
scenarios in which this causes problems, but if this is a concern,
the solution is simply to use createOffer to ensure a unique
<session-version>.
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 If any RtpTransceiver has been added, and there exists an m= o If any RtpTransceiver has been added, and there exists an m=
skipping to change at page 41, line 8 skipping to change at page 43, line 17
o The RTP header extensions MUST only include those that are present o The RTP header extensions MUST only include those that are present
in the most recent answer. in the most recent answer.
o The RTCP feedback extensions MUST only include those that are o The RTCP feedback extensions MUST only include those that are
present in the most recent answer. present in the most recent answer.
o The "a=rtcp-mux" line MUST only be added if present in the most o The "a=rtcp-mux" line MUST only be added if present in the most
recent answer. recent answer.
o The "a=rtcp-mux-only" line MUST only be added if present in the
most recent answer.
o The "a=rtcp-rsize" line MUST only be added if present in the most o The "a=rtcp-rsize" line MUST only be added if present in the most
recent answer. recent answer.
The "a=group:BUNDLE" attribute MUST include the mid identifiers The "a=group:BUNDLE" attribute MUST include the mid identifiers
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.
skipping to change at page 42, line 22 skipping to change at page 44, line 38
Note that setting the "VoiceActivityDetection" parameter when Note that setting the "VoiceActivityDetection" parameter when
generating an offer is a request to receive audio with silence generating an offer is a request to receive audio with silence
suppression. It has no impact on whether the local endpoint does suppression. It has no impact on whether the local endpoint does
silence suppression for the audio it sends. silence suppression for the audio it sends.
The "VoiceActivityDetection" option does not have any impact on the The "VoiceActivityDetection" option does not have any impact on the
setting of the "vad" value in the signaling of the client to mixer setting of the "vad" value in the signaling of the client to mixer
audio level header extension described in [RFC6464], Section 4. audio level header extension described in [RFC6464], Section 4.
5.2.4. Direction Attribute in Offers
[RFC3264] direction attributes (defined in Section 6.1) in offers are
chosen according to the states of the RtpSender and RtpReceiver of a
given RtpTransceiver, as follows:
+-----------+-------------+-----------------+
| RtpSender | RtpReceiver | offer direction |
+-----------+-------------+-----------------+
| active | active | sendrecv |
| active | inactive | sendonly |
| inactive | active | recvonly |
| inactive | inactive | inactive |
+-----------+-------------+-----------------+
5.3. Generating an Answer 5.3. Generating an Answer
When createAnswer is called, a new SDP description must be created When createAnswer is called, a new SDP description must be created
that is compatible with the supplied remote description as well as that is compatible with the supplied remote description as well as
the requirements specified in [I-D.ietf-rtcweb-rtp-usage]. The exact the requirements specified in [I-D.ietf-rtcweb-rtp-usage]. The exact
details of this process are explained below. details of this process are explained below.
5.3.1. Initial Answers 5.3.1. Initial Answers
When createAnswer is called for the first time after a remote When createAnswer is called for the first time after a remote
skipping to change at page 43, line 36 skipping to change at page 45, line 39
ignored and no corresponding "LS" group generated. ignored and no corresponding "LS" group generated.
The next step is to generate m= sections for each m= section that is The next step is to generate m= sections for each m= section that is
present in the remote offer, as specified in [RFC3264], Section 6. present in the remote offer, as specified in [RFC3264], Section 6.
For the purposes of this discussion, any session-level attributes in For the purposes of this discussion, any session-level attributes in
the offer that are also valid as media-level attributes SHALL be the offer that are also valid as media-level attributes SHALL be
considered to be present in each m= section. considered to be present in each m= section.
The next step is to go through each offered m= section. Each offered The next step is to go through each offered m= section. Each offered
m= section will have an associated RtpTransceiver, as described in m= section will have an associated RtpTransceiver, as described in
Section 5.8. If there are more RtpTransceivers than there are m= Section 5.9. If there are more RtpTransceivers than there are m=
sections, the unmatched RtpTransceivers will need to be associated in sections, the unmatched RtpTransceivers will need to be associated in
a subsequent offer. a subsequent offer.
For each offered m= section, if any of the following conditions are For each offered m= section, if any of the following conditions are
true, the corresponding m= section in the answer MUST be marked as true, the corresponding m= section in the answer MUST be marked as
rejected by setting the port in the m= line to zero, as indicated in rejected by setting the port in the m= line to zero, as indicated in
[RFC3264], Section 6., and further processing for this m= section can [RFC3264], Section 6., and further processing for this m= section can
be skipped: be skipped:
o The associated RtpTransceiver has been stopped. o The associated RtpTransceiver has been stopped.
o No supported codec is present in the offer. o No supported codec is present in the offer.
o The bundle policy is "max-bundle", the m= section is not in a o The bundle policy is "max-bundle", and this is not the first m=
bundle group, and this is not the first m= section. section or in the same bundle group as the first m= section.
o The bundle policy is "balanced", the m= section is not in a bundle o The bundle policy is "balanced", and this is not the first m=
group, and this is not the first m= section for this media type. section for this media type or in the same bundle group as the
first m= section for this media type.
o The RTP/RTCP multiplexing policy is "require" and the m= section o The RTP/RTCP multiplexing policy is "require" and the m= section
doesn't contain an "a=rtcp-mux" attribute. doesn't contain an "a=rtcp-mux" attribute.
Otherwise, each m= section in the answer should then be generated as Otherwise, each m= section in the answer should then be generated as
specified in [RFC3264], Section 6.1. For the m= line itself, the specified in [RFC3264], Section 6.1. For the m= line itself, the
following rules must be followed: following rules must be followed:
o The port value would normally be set to the port of the default o The port value would normally be set to the port of the default
ICE candidate for this m= section, but given that no candidates ICE candidate for this m= section, but given that no candidates
skipping to change at page 44, line 41 skipping to change at page 46, line 45
section MUST include the following: section MUST include the following:
o If and only if present in the offer, an "a=mid" line, as specified o If and only if present in the offer, an "a=mid" line, as specified
in [RFC5888], Section 9.1. The "mid" value MUST match that in [RFC5888], Section 9.1. The "mid" value MUST match that
specified in the offer. specified in the offer.
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 IP4 0.0.0.0", because no containing the dummy value "9 IN IP4 0.0.0.0", because no
candidates have yet been gathered. candidates have yet been gathered.
o A direction attribute for the associated RtpTransceiver described o A direction attribute which is the same as that of the associated
by Section 5.3.4. transceiver.
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. The audio and video codecs that MUST be [RFC3264], Section 6.1. The audio and video codecs that MUST be
supported are specified in [I-D.ietf-rtcweb-audio](see Section 3) supported are specified in [I-D.ietf-rtcweb-audio](see Section 3)
and [I-D.ietf-rtcweb-video](see Section 5). 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
skipping to change at page 45, line 26 skipping to change at page 47, line 29
o For each supported FEC mechanism, "a=rtpmap" and "a=fmtp" lines, o For each supported FEC mechanism, "a=rtpmap" and "a=fmtp" lines,
as specified in [RFC4566], Section 6. The FEC mechanisms that as specified in [RFC4566], Section 6. The FEC mechanisms that
MUST be supported are specified in [I-D.ietf-rtcweb-fec], MUST be supported are specified in [I-D.ietf-rtcweb-fec],
Section 6, and specific usage for each media type is outlined in Section 6, and specific usage for each media type is outlined in
Sections 4 and 5. Sections 4 and 5.
o "a=ice-ufrag" and "a=ice-pwd" lines, as specified in [RFC5245], o "a=ice-ufrag" and "a=ice-pwd" lines, as specified in [RFC5245],
Section 15.4. Section 15.4.
o An "a=fingerprint" line for each of the endpoint's certificates, o One or more "a=fingerprint" line(s) for each of the endpoint's
as specified in [RFC4572], Section 5; the digest algorithm used certificates, as specified in [I-D.ietf-mmusic-4572-update].
for the fingerprint MUST match that used in the 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. If the "require" RTCP multiplexing [RFC5761], Section 5.1.1. If the "require" RTCP multiplexing
policy is set and no "a=rtcp-mux" line is present in the offer, 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 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. the m= line to zero, as indicated in [RFC3264], Section 6.
o If present in the offer, an "a=rtcp-mux-only" line, as specified
in [I-D.ietf-mmusic-mux-exclusive], Section 4.3.
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. Any header specified in [I-D.ietf-rtcweb-rtp-usage], Section 5.2. Any header
extensions that require encryption MUST be specified as indicated extensions that require encryption MUST be specified as indicated
in [RFC6904], Section 4. in [RFC6904], Section 4.
skipping to change at page 48, line 42 skipping to change at page 50, line 43
Silence suppression in the answer is handled as described in Silence suppression in the answer is handled as described in
Section 5.2.3.2, with one exception: if support for silence Section 5.2.3.2, with one exception: if support for silence
suppression was not indicated in the offer, the suppression was not indicated in the offer, the
VoiceActivityDetection parameter has no effect, and the answer should VoiceActivityDetection parameter has no effect, and the answer should
be generated as if VoiceActivityDetection was set to false. This is be generated as if VoiceActivityDetection was set to false. This is
done on a per-codec basis (e.g., if the offerer somehow offered done on a per-codec basis (e.g., if the offerer somehow offered
support for CN but set "usedtx=0" for Opus, setting support for CN but set "usedtx=0" for Opus, setting
VoiceActivityDetection to true would result in an answer with CN VoiceActivityDetection to true would result in an answer with CN
codecs and "usedtx=0"). codecs and "usedtx=0").
5.3.4. Direction Attribute in Answers 5.4. Modifying an Offer or Answer
[RFC3264] direction attributes (defined in Section 6.1) in answers The SDP returned from createOffer or createAnswer MUST NOT be changed
are chosen according to the direction attribute in the remote offer before passing it to setLocalDescription. If precise control over
and the states of the RtpSender and RtpReceiver of the corresponding the SDP is needed, the aformentioned createOffer/createAnswer options
RtpTransceiver, as follows: or RTPSender APIs MUST be used.
+-----------------+-----------+-------------+------------------+ Note that the application MAY modify the SDP to reduce the
| offer direction | RtpSender | RtpReceiver | answer direction | capabilities in the offer it sends to the far side (post-
+-----------------+-----------+-------------+------------------+ setLocalDescription) or the offer that it installs from the far side
| sendrecv | active | active | sendrecv | (pre-setRemoteDescription), as long as it remains a valid SDP offer
| sendrecv | active | inactive | sendonly | and specifies a subset of what was in the original offer. This is
| sendrecv | inactive | active | recvonly | safe because the answer is not permitted to expand capabilities, and
| sendrecv | inactive | inactive | inactive | therefore will just respond to what is present in the offer.
| sendonly | * | active | recvonly |
| sendonly | * | inactive | inactive |
| recvonly | active | * | sendonly |
| recvonly | inactive | * | inactive |
| inactive | * | * | inactive |
+-----------------+-----------+-------------+------------------+
5.4. Processing a Local Description The application SHOULD NOT modify the SDP in the answer it transmits,
as the answer contains the negotiated capabilities, and this can
cause the two sides to have different ideas about what exactly was
negotiated.
As always, the application is solely responsible for what it sends to
the other party, and all incoming SDP will be processed by the
browser to the extent of its capabilities. It is an error to assume
that all SDP is well-formed; however, one should be able to assume
that any implementation of this specification will be able to
process, as a remote offer or answer, unmodified SDP coming from any
other implementation of this specification.
5.5. Processing a Local Description
When a SessionDescription is supplied to setLocalDescription, the When a SessionDescription is supplied to setLocalDescription, the
following steps MUST be performed: following steps MUST be performed:
o First, the type of the SessionDescription is checked against the o First, the type of the SessionDescription is checked against the
current state of the PeerConnection: current state of the PeerConnection:
* If the type is "offer", the PeerConnection state MUST be either * If the type is "offer", the PeerConnection state MUST be either
"stable" or "have-local-offer". "stable" or "have-local-offer".
* If the type is "pranswer" or "answer", the PeerConnection state * If the type is "pranswer" or "answer", the PeerConnection state
MUST be either "have-remote-offer" or "have-local-pranswer". MUST be either "have-remote-offer" or "have-local-pranswer".
o If the type is not correct for the current state, processing MUST o If the type is not correct for the current state, processing MUST
stop and an error MUST be returned. stop and an error MUST be returned.
o Next, the SessionDescription is parsed into a data structure, as o Next, the SessionDescription is parsed into a data structure, as
described in the Section 5.6 section below. If parsing fails for described in the Section 5.7 section below. If parsing fails for
any reason, processing MUST stop and an error MUST be returned. any reason, processing MUST stop and an error MUST be returned.
o Finally, the parsed SessionDescription is applied as described in o Finally, the parsed SessionDescription is applied as described in
the Section 5.7 section below. the Section 5.8 section below.
5.5. Processing a Remote Description 5.6. Processing a Remote Description
When a SessionDescription is supplied to setRemoteDescription, the When a SessionDescription is supplied to setRemoteDescription, the
following steps MUST be performed: following steps MUST be performed:
o First, the type of the SessionDescription is checked against the o First, the type of the SessionDescription is checked against the
current state of the PeerConnection: current state of the PeerConnection:
* If the type is "offer", the PeerConnection state MUST be either * If the type is "offer", the PeerConnection state MUST be either
"stable" or "have-remote-offer". "stable" or "have-remote-offer".
* If the type is "pranswer" or "answer", the PeerConnection state * If the type is "pranswer" or "answer", the PeerConnection state
MUST be either "have-local-offer" or "have-remote-pranswer". MUST be either "have-local-offer" or "have-remote-pranswer".
o If the type is not correct for the current state, processing MUST o If the type is not correct for the current state, processing MUST
stop and an error MUST be returned. stop and an error MUST be returned.
o Next, the SessionDescription is parsed into a data structure, as o Next, the SessionDescription is parsed into a data structure, as
described in the Section 5.6 section below. If parsing fails for described in the Section 5.7 section below. If parsing fails for
any reason, processing MUST stop and an error MUST be returned. any reason, processing MUST stop and an error MUST be returned.
o Finally, the parsed SessionDescription is applied as described in o Finally, the parsed SessionDescription is applied as described in
the Section 5.8 section below. the Section 5.9 section below.
5.6. Parsing a Session Description 5.7. Parsing a Session Description
When a SessionDescription of any type is supplied to setLocal/ When a SessionDescription of any type is supplied to setLocal/
RemoteDescription, the implementation must parse it and reject it if RemoteDescription, the implementation must parse it and reject it if
it is invalid. The exact details of this process are explained it is invalid. The exact details of this process are explained
below. below.
The SDP contained in the session description object consists of a The SDP contained in the session description object consists of a
sequence of text lines, each containing a key-value expression, as sequence of text lines, each containing a key-value expression, as
described in [RFC4566], Section 5. The SDP is read, line-by-line, described in [RFC4566], Section 5. The SDP is read, line-by-line,
and converted to a data structure that contains the deserialized and converted to a data structure that contains the deserialized
skipping to change at page 51, line 41 skipping to change at page 53, line 41
Table 1: SDP ABNF References Table 1: SDP ABNF References
[TODO: ensure that every line is listed below.] [TODO: ensure that every line is listed below.]
If the line is not well-formed, or cannot be parsed as described, the 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. parser MUST stop with an error and reject the session description.
This ensures that implementations do not accidentally misinterpret This ensures that implementations do not accidentally misinterpret
ambiguous SDP. ambiguous SDP.
5.6.1. Session-Level Parsing 5.7.1. Session-Level Parsing
First, the session-level lines are checked and parsed. These lines First, the session-level lines are checked and parsed. These lines
MUST occur in a specific order, and with a specific syntax, as MUST occur in a specific order, and with a specific syntax, as
defined in [RFC4566], Section 5. Note that while the specific line 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 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 same type (typically "a=") can occur in any order, and their ordering
is not meaningful. is not meaningful.
For non-attribute (non-"a=") lines, their sequencing, syntax, and For non-attribute (non-"a=") lines, their sequencing, syntax, and
semantics, are checked, as mentioned above. The following lines are semantics, are checked, as mentioned above. The following lines are
skipping to change at page 53, line 11 skipping to change at page 55, line 11
o Any "a=fingerprint" lines are parsed as specified in [RFC4572], o Any "a=fingerprint" lines are parsed as specified in [RFC4572],
Section 5, and the set of fingerprint and algorithm values is Section 5, and the set of fingerprint and algorithm values is
stored. stored.
o If present, a single "a=setup" line is parsed as specified in o If present, a single "a=setup" line is parsed as specified in
[RFC4145], Section 4, and the setup value is stored. [RFC4145], Section 4, and the setup value is stored.
o Any "a=extmap" lines are parsed as specified in [RFC5285], o Any "a=extmap" lines are parsed as specified in [RFC5285],
Section 5, and their values are stored. Section 5, and their values are stored.
o TODO: identity, rtcp-rsize, rtcp-mux, and any other attributes
valid at session level.
Once all the session-level lines have been parsed, processing Once all the session-level lines have been parsed, processing
continues with the lines in media sections. continues with the lines in media sections.
5.6.2. Media Section Parsing 5.7.2. Media Section Parsing
Like the session-level lines, the media session lines MUST occur in Like the session-level lines, the media session lines MUST occur in
the specific order and with the specific syntax defined in [RFC4566], the specific order and with the specific syntax defined in [RFC4566],
Section 5. Section 5.
The "m=" line itself MUST be parsed as described in [RFC4566], The "m=" line itself MUST be parsed as described in [RFC4566],
Section 5.14, and the media, port, proto, and fmt values stored. Section 5.14, and the media, port, proto, and fmt values stored.
Following the "m=" line, specific processing MUST be applied for the Following the "m=" line, specific processing MUST be applied for the
following non-attribute lines: following non-attribute lines:
skipping to change at page 54, line 41 skipping to change at page 56, line 38
o Any "a=extmap" attributes MUST be parsed as specified in o Any "a=extmap" attributes MUST be parsed as specified in
[RFC5285], Section 5, and their values stored. [RFC5285], Section 5, and their values stored.
o Any "a=rtcp-fb" attributes MUST be parsed as specified in o Any "a=rtcp-fb" attributes MUST be parsed as specified in
[RFC4585], Section 4.2., and their values stored. [RFC4585], Section 4.2., and their values stored.
o If present, a single "a=rtcp-mux" attribute MUST be parsed as o If present, a single "a=rtcp-mux" attribute MUST be parsed as
specified in [RFC5761], Section 5.1.1, and its presence or absence specified in [RFC5761], Section 5.1.1, and its presence or absence
flagged and stored. flagged and stored.
o If present, a single "a=rtcp-mux-only" attribute MUST be parsed as
specified in [I-D.ietf-mmusic-mux-exclusive], Section 3, and its
presence or absence flagged and stored.
o If present, a single "a=rtcp-rsize" attribute MUST be parsed as o If present, a single "a=rtcp-rsize" attribute MUST be parsed as
specified in [RFC5506], Section 5, and its presence or absence specified in [RFC5506], Section 5, and its presence or absence
flagged and stored. flagged and stored.
o If present, a single "a=rtcp" attribute MUST be parsed as o If present, a single "a=rtcp" attribute MUST be parsed as
specified in [RFC3605], Section 2.1, but its value is ignored. specified in [RFC3605], Section 2.1, but its value is ignored, as
this information is superfluous when using ICE.
o If present, a single "a=msid" attribute MUST be parsed as o If present, a single "a=msid" attribute MUST be parsed as
specified in [I-D.ietf-mmusic-msid], Section 3.2, and its value specified in [I-D.ietf-mmusic-msid], Section 3.2, and its value
stored. stored.
o Any "a=candidate" attributes MUST be parsed as specified in o Any "a=candidate" attributes MUST be parsed as specified in
[RFC5245], Section 4.3, and their values stored. [RFC5245], Section 4.3, and their values stored.
o Any "a=remote-candidates" attributes MUST be parsed as specified o Any "a=remote-candidates" attributes MUST be parsed as specified
in [RFC5245], Section 4.3, but their values are ignored. in [RFC5245], Section 4.3, but their values are ignored.
skipping to change at page 55, line 40 skipping to change at page 57, line 40
protocol value stored. protocol value stored.
o An "a=sctp-port" attribute MUST be present, and it MUST be parsed 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 as specified in [I-D.ietf-mmusic-sctp-sdp], Section 5.2, and the
value stored. value stored.
o If present, a single "a=max-message-size" attribute MUST be parsed o If present, a single "a=max-message-size" attribute MUST be parsed
as specified in [I-D.ietf-mmusic-sctp-sdp], Section 6, and the as specified in [I-D.ietf-mmusic-sctp-sdp], Section 6, and the
value stored. Otherwise, use the specified default. value stored. Otherwise, use the specified default.
5.6.3. Semantics Verification 5.7.3. Semantics Verification
Assuming parsing completes successfully, the parsed description is Assuming parsing completes successfully, the parsed description is
then evaluated to ensure internal consistency as well as proper then evaluated to ensure internal consistency as well as proper
support for mandatory features. Specifically, the following checks support for mandatory features. Specifically, the following checks
are performed: are performed:
o For each m= section, valid values for each of the mandatory-to-use 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 features enumerated in Section 5.1.2 MUST be present. These
values MAY either be present at the media level, or inherited from values MAY either be present at the media level, or inherited from
the session level. the session level.
skipping to change at page 56, line 35 skipping to change at page 58, line 35
o The session description must follow the rules defined in o The session description must follow the rules defined in
[RFC3264], Section 6, including the requirement that the number of [RFC3264], Section 6, including the requirement that the number of
m= sections MUST exactly match the number of m= sections in the m= sections MUST exactly match the number of m= sections in the
associated offer. associated offer.
o For each m= section, the media type and protocol values MUST o For each m= section, the media type and protocol values MUST
exactly match the media type and protocol values in the exactly match the media type and protocol values in the
corresponding m= section in the associated offer. corresponding m= section in the associated offer.
5.7. Applying a Local Description 5.8. Applying a Local Description
The following steps are performed at the media engine level to apply The following steps are performed at the media engine level to apply
a local description. a local description.
First, the parsed parameters are checked to ensure that any First, the parsed parameters are checked to ensure that they have not
modifications performed fall within those explicitly permitted by been altered after their generation in createOffer/createAnswer, as
Section 6; otherwise, processing MUST stop and an error MUST be discussed in Section 5.4; otherwise, processing MUST stop and an
returned. error MUST be returned.
Next, media sections are processed. For each media section, the Next, media sections are processed. For each media section, the
following steps MUST be performed; if any parameters are out of following steps MUST be performed; if any parameters are out of
bounds, or cannot be applied, processing MUST stop and an error MUST bounds, or cannot be applied, processing MUST stop and an error MUST
be returned. be returned.
o If this media section is new, begin gathering candidates for it, o If this media section is new, begin gathering candidates for it,
as defined in [RFC5245], Section 4.1.1, unless it has been marked as defined in [RFC5245], Section 4.1.1, unless it has been marked
as bundle-only. as bundle-only.
o Or, if the ICE ufrag and password values have changed, trigger the o Or, if the ICE ufrag and password values have changed, and it has
ICE Agent to start an ICE restart and begin gathering new not been marked as bundle-only, trigger the ICE Agent to start an
candidates for the media section, as defined in [RFC5245], ICE restart, and begin gathering new candidates for the media
Section 9.1.1.1, unless it has been marked as bundle-only. section as described in [RFC5245], Section 9.1.1.1. If this
description is an answer, also start checks on that media section
as defined in [RFC5245], Section 9.3.1.1.
o If the media section proto value indicates use of RTP: o If the media section proto value indicates use of RTP:
* If there is no RtpTransceiver associated with this m= section * If there is no RtpTransceiver associated with this m= section
(which should only happen when applying an offer), find one and (which should only happen when applying an offer), find one and
associate it with this m= section according to the following associate it with this m= section according to the following
steps: steps:
+ Find the RtpTransceiver that corresponds to the m= section + Find the RtpTransceiver that corresponds to the m= section
with the same MID in the created offer. with the same MID in the created offer.
skipping to change at page 57, line 30 skipping to change at page 59, line 32
+ Set the value of the RtpTransceiver's mid attribute to the + Set the value of the RtpTransceiver's mid attribute to the
MID of the m= section. MID of the m= section.
* If RTCP mux is indicated, prepare to demux RTP and RTCP from * If RTCP mux is indicated, prepare to demux RTP and RTCP from
the RTP ICE component, as specified in [RFC5761], the RTP ICE component, as specified in [RFC5761],
Section 5.1.1. If RTCP mux is not indicated, but was indicated Section 5.1.1. If RTCP mux is not indicated, but was indicated
in a previous description, this MUST result in an error. in a previous description, this MUST result in an error.
* For each specified RTP header extension, establish a mapping * For each specified RTP header extension, establish a mapping
between the extension ID and URI, as described in section 6 of between the extension ID and URI, as described in section 6 of
[RFC5285]. If any indicated RTP header extension is unknown, [RFC5285]. If any indicated RTP header extension is not
this MUST result in an error. supported, this MUST result in an error.
* If the MID header extension is supported, prepare to demux RTP * If the MID header extension is supported, prepare to demux RTP
data intended for this media section based on the MID header data intended for this media section based on the MID header
extension, as described in [I-D.ietf-mmusic-msid], Section 3.2. extension, as described in [I-D.ietf-mmusic-msid], Section 3.2.
* For each specified payload type, establish a mapping between * For each specified media format, establish a mapping between
the payload type ID and the actual media format, as described the payload type and the actual media format, as described in
in [RFC3264]. If any indicated payload type is unknown, this [RFC3264], Section 6.1. If any indicated media format is not
MUST result in an error. supported, this MUST result in an error.
* For each specified "rtx" media format, establish a mapping * For each specified "rtx" media format, establish a mapping
between the RTX payload type and its associated primary payload between the RTX payload type and its associated primary payload
type, as described in [RFC4588], Sections 8.6 and 8.7. If any type, as described in [RFC4588], Sections 8.6 and 8.7. If any
referenced primary payload types are not present, this MUST referenced primary payload types are not present, this MUST
result in an error. result in an error.
* If the directional attribute is of type "sendrecv" or * If the directional attribute is of type "sendrecv" or
"recvonly", enable receipt and decoding of media. "recvonly", enable receipt and decoding of media.
Finally, if this description is of type "pranswer" or "answer", Finally, if this description is of type "pranswer" or "answer",
follow the processing defined in the Section 5.9 section below. follow the processing defined in the Section 5.10 section below.
5.8. Applying a Remote Description 5.9. Applying a Remote Description
If the answer contains any "a=ice-options" attributes where "trickle" If the answer contains any "a=ice-options" attributes where "trickle"
is listed as an attribute, update the PeerConnection canTrickle is listed as an attribute, update the PeerConnection canTrickle
property to be true. Otherwise, set this property to false. property to be true. Otherwise, set this property to false.
The following steps are performed at the media engine level to apply The following steps are performed at the media engine level to apply
a remote description. a remote description.
The following steps MUST be performed for attributes at the session The following steps MUST be performed for attributes at the session
level; if any parameters are out of bounds, or cannot be applied, level; if any parameters are out of bounds, or cannot be applied,
skipping to change at page 58, line 35 skipping to change at page 60, line 38
o For any specified "RR" or "RS" bandwidth values, handle as o For any specified "RR" or "RS" bandwidth values, handle as
specified in [RFC3556], Section 2. specified in [RFC3556], Section 2.
o Any "AS" bandwidth value MUST be ignored, as the meaning of this o Any "AS" bandwidth value MUST be ignored, as the meaning of this
construct at the session level is not well defined. construct at the session level is not well defined.
For each media section, the following steps MUST be performed; if any For each media section, the following steps MUST be performed; if any
parameters are out of bounds, or cannot be applied, processing MUST parameters are out of bounds, or cannot be applied, processing MUST
stop and an error MUST be returned. stop and an error MUST be returned.
o If the description is of type "offer", and the ICE ufrag or o If the ICE ufrag or password changed from the previous remote
password changed from the previous remote description, as description, then an ICE restart is needed, as described in
described in Section 9.1.1.1 of [RFC5245], mark that an ICE Section 9.1.1.1 of [RFC5245] If the description is of type
restart is needed. "offer", mark that an ICE restart is needed. If the description
is of type "answer" and the current local description is also an
ICE restart, then signal the ICE agent to begin checks as
described in Section 9.3.1.1 of [RFC5245]. An answer MUST change
the ufrag and password in an answer if and only if ICE is
restarting, as described in Section 9.2.1.1 of [RFC5245].
o Configure the ICE components associated with this media section to o Configure the ICE components associated with this media section to
use the supplied ICE remote ufrag and password for their use the supplied ICE remote ufrag and password for their
connectivity checks. connectivity checks.
o Pair any supplied ICE candidates with any gathered local o Pair any supplied ICE candidates with any gathered local
candidates, as described in Section 5.7 of [RFC5245] and start candidates, as described in Section 5.7 of [RFC5245] and start
connectivity checks with the appropriate credentials. connectivity checks with the appropriate credentials.
o If an "a=end-of-candidates" attribute is present, process the end- o If an "a=end-of-candidates" attribute is present, process the end-
of-candidates indication as described in [I-D.ietf-ice-trickle] of-candidates indication as described in [I-D.ietf-ice-trickle]
Section 11. Section 11.
o If the media section proto value indicates use of RTP: o If the media section proto value indicates use of RTP:
* [TODO: header extensions]
* If the m= section is being recycled (see Section 5.2.2), * If the m= section is being recycled (see Section 5.2.2),
dissociate the currently associated RtpTransceiver by setting dissociate the currently associated RtpTransceiver by setting
its mid attribute to null. its mid attribute to null.
* If the m= section is not associated with any RtpTransceiver * If the m= section is not associated with any RtpTransceiver
(possibly because it was dissociated in the previous step), (possibly because it was dissociated in the previous step),
either find an RtpTransceiver or create one according to the either find an RtpTransceiver or create one according to the
following steps: following steps:
+ If the m= section is sendrecv or recvonly, and there are + If the m= section is sendrecv or recvonly, and there are
skipping to change at page 59, line 28 skipping to change at page 61, line 36
PeerConnection by addTrack and are not associated with any PeerConnection by addTrack and are not associated with any
m= section and are not stopped, find the first (according to m= section and are not stopped, find the first (according to
the canonical order described in Section 5.2.1) such the canonical order described in Section 5.2.1) such
RtpTransceiver. RtpTransceiver.
+ If no RtpTransceiver was found in the previous step, create + If no RtpTransceiver was found in the previous step, create
one with an inactive RtpSender and active RtpReceiver. one with an inactive RtpSender and active RtpReceiver.
+ Associate the found or created RtpTransceiver with the m= + Associate the found or created RtpTransceiver with the m=
section by setting the value of the RtpTransceiver's mid section by setting the value of the RtpTransceiver's mid
attribute to the MID of the m= section. attribute to the MID of the m= section. If the m= section
does not include a MID (i.e., the remote side does not
support the MID extension), generate a value for the
RtpTransceiver mid attribute, following the guidance for
"a=mid" mentioned in Section 5.2.1.
* For each specified payload type that is also supported by the * For each specified media format that is also supported by the
local implementation, establish a mapping between the payload local implementation, establish a mapping between the specified
type ID and the actual media format. [TODO - Justin to add payload type and the media format, as described in [RFC3264],
more to explain mapping.] If any indicated payload type is Section 6.1. Specifically, this means that the implementation
unknown, it MUST be ignored. [TODO: should fail on answers] records the payload type to be used in outgoing RTP packets
when sending each specified media format, as well as the
relative preference for each format that is indicated in their
ordering. If any indicated media format is not supported by
the local implementation, it MUST be ignored.
* For each specified "rtx" media format, establish a mapping * For each specified "rtx" media format, establish a mapping
between the RTX payload type and its associated primary payload between the RTX payload type and its associated primary payload
type, as described in [RFC4588]. If any referenced primary type, as described in [RFC4588], Section 4. If any referenced
payload types are not present, this MUST result in an error. primary payload types are not present, this MUST result in an
error.
* For each specified fmtp parameter that is supported by the * For each specified fmtp parameter that is supported by the
local implementation, enable them on the associated payload local implementation, enable them on the associated media
types. formats.
* For each specified RTP header extension that is also supported
by the local implementation, establish a mapping between the
extension ID and URI, as described in [RFC5285], Section 5.
Specifically, this means that the implementation records the
extension ID to be used in outgoing RTP packets when sending
each specified header extension. If any indicated RTP header
extension is not supported by the local implementation, it MUST
be ignored.
* For each specified RTCP feedback mechanism that is supported by * For each specified RTCP feedback mechanism that is supported by
the local implementation, enable them on the associated payload the local implementation, enable them on the associated media
types. formats.
* For any specified "TIAS" bandwidth value, set this value as a * For any specified "TIAS" bandwidth value, set this value as a
constraint on the maximum RTP bitrate to be used when sending constraint on the maximum RTP bitrate to be used when sending
media, as specified in [RFC3890]. If a "TIAS" value is not media, as specified in [RFC3890]. If a "TIAS" value is not
present, but an "AS" value is specified, generate a "TIAS" present, but an "AS" value is specified, generate a "TIAS"
value using this formula: value using this formula:
TIAS = AS * 1000 * 0.95 - 50 * 40 * 8 TIAS = AS * 1000 * 0.95 - 50 * 40 * 8
The 50 is based on 50 packets per second, the 40 is based on an The 50 is based on 50 packets per second, the 40 is based on an
skipping to change at page 60, line 24 skipping to change at page 62, line 51
* For any "RR" or "RS" bandwidth values, handle as specified in * For any "RR" or "RS" bandwidth values, handle as specified in
[RFC3556], Section 2. [RFC3556], Section 2.
* Any specified "CT" bandwidth value MUST be ignored, as the * Any specified "CT" bandwidth value MUST be ignored, as the
meaning of this construct at the media level is not well meaning of this construct at the media level is not well
defined. defined.
* [TODO: handling of CN, telephone-event, "red"] * [TODO: handling of CN, telephone-event, "red"]
* If the media section if of type audio: * If the media section is of type audio:
+ For any specified "ptime" value, configure the available + For any specified "ptime" value, configure the available
payload types to use the specified packet size. If the media formats to use the specified packet size. If the
specified size is not supported for a payload type, use the specified size is not supported for a media format, use the
next closest value instead. next closest value instead.
Finally, if this description is of type "pranswer" or "answer", Finally, if this description is of type "pranswer" or "answer",
follow the processing defined in the Section 5.9 section below. follow the processing defined in the Section 5.10 section below.
5.9. Applying an Answer 5.10. Applying an Answer
In addition to the steps mentioned above for processing a local or In addition to the steps mentioned above for processing a local or
remote description, the following steps are performed when processing remote description, the following steps are performed when processing
a description of type "pranswer" or "answer". a description of type "pranswer" or "answer".
For each media section, the following steps MUST be performed: For each media section, the following steps MUST be performed:
o If the media section has been rejected (i.e. port is set to zero o If the media section has been rejected (i.e. port is set to zero
in the answer), stop any reception or transmission of media for in the answer), stop any reception or transmission of media for
this section, and discard any associated ICE components, as this section, and discard any associated ICE components, as
skipping to change at page 61, line 11 skipping to change at page 63, line 35
o If the remote DTLS fingerprint has been changed, tear down the o If the remote DTLS fingerprint has been changed, tear down the
existing DTLS connection. existing DTLS connection.
o If no valid DTLS connection exists, prepare to start a DTLS o If no valid DTLS connection exists, prepare to start a DTLS
connection, using the specified roles and fingerprints, on any connection, using the specified roles and fingerprints, on any
underlying ICE components, once they are active. underlying ICE components, once they are active.
o If the media section proto value indicates use of RTP: o If the media section proto value indicates use of RTP:
* If the media section references any media formats, RTP header
extensions, or RTCP feedback mechanisms that were not present
in the corresponding media section in the offer, this indicates
a negotiation problem and MUST result in an error.
* If the media section has RTCP mux enabled, discard any RTCP * If the media section has RTCP mux enabled, discard any RTCP
component, and begin or continue muxing RTCP over the RTP component, and begin or continue muxing RTCP over the RTP
component, as specified in [RFC5761], Section 5.1.3. component, as specified in [RFC5761], Section 5.1.3.
Otherwise, transmit RTCP over the RTCP component; if no RTCP Otherwise, transmit RTCP over the RTCP component; if no RTCP
component exists, because RTCP mux was previously enabled, this component exists, because RTCP mux was previously enabled, this
MUST result in an error. MUST result in an error.
* If the media section has reduced-size RTCP enabled, configure * If the media section has reduced-size RTCP enabled, configure
the RTCP transmission for this media section to use reduced- the RTCP transmission for this media section to use reduced-
size RTCP, as specified in [RFC5506]. size RTCP, as specified in [RFC5506].
* [TODO: enable appropriate rtcp-fb mechanisms]
* If the directional attribute in the answer is of type * If the directional attribute in the answer is of type
"sendrecv" or "sendonly", prepare to start transmitting media "sendrecv" or "sendonly", prepare to start transmitting media
using the specified primary SSRC and one of the selected using the most preferred media format from the remote
payload types, once the underlying transport layers have been description that is also present in the answer, as described in
established. If RID values are specified, include the RID [RFC3264], Sections 6.1 and 7, once the underlying transport
header extension in the RTP streams, as indicated in layers have been established. [TODO: add discusssion of
[I-D.ietf-mmusic-rid], Section 4). If simulcast is negotiated, RED/FEC/RTX/CN] The payload type mapping from the remote
send the number of Source RTP Streams as specified in description is used to determine payload types for the outgoing
[I-D.ietf-mmusic-sdp-simulcast], Section 6.2.2. If the RTP streams. Any RTP header extensions that were negotiated
directional attribute is of type "recvonly" or "inactive", stop should be included in the outgoing RTP streams, using the
transmitting RTP media, although RTCP should still be sent, as extension mapping from the remote description; if the RID
described in [RFC3264], Section 5.1. header extension has been negotiated, and RID values are
specified, include the RID header extension in the outgoing RTP
streams, as indicated in [I-D.ietf-mmusic-rid], Section 4). If
simulcast is negotiated, send the number of Source RTP Streams
as specified in [I-D.ietf-mmusic-sdp-simulcast], Section 6.2.2.
* If the directional attribute is of type "recvonly" or
"inactive", stop transmitting RTP media, although RTCP should
still be sent, as described in [RFC3264], Section 5.1.
o If the media section proto value indicates use of SCTP: o If the media section proto value indicates use of SCTP:
* If no SCTP association yet exists, prepare to initiate a SCTP * If no SCTP association yet exists, prepare to initiate a SCTP
association over the associated ICE component and DTLS association over the associated ICE component and DTLS
connection, using the local SCTP port value from the local connection, using the local SCTP port value from the local
description, and the remote SCTP port value from the remote description, and the remote SCTP port value from the remote
description, as described in [I-D.ietf-mmusic-sctp-sdp], description, as described in [I-D.ietf-mmusic-sctp-sdp],
Section 10.2. Section 10.2.
If the answer contains valid bundle groups, discard any ICE If the answer contains valid bundle groups, discard any ICE
components for the m= sections that will be bundled onto the primary components for the m= sections that will be bundled onto the primary
ICE components in each bundle, and begin muxing these m= sections ICE components in each bundle, and begin muxing these m= sections
accordingly, as described in accordingly, as described in
[I-D.ietf-mmusic-sdp-bundle-negotiation], Section 8.2. [I-D.ietf-mmusic-sdp-bundle-negotiation], Section 8.2.
6. Configurable SDP Parameters 6. Demux placeholder
It is possible to change elements in the SDP returned from
createOffer before passing it to setLocalDescription. When an
implementation receives modified SDP it MUST either:
o Accept the changes and adjust its behavior to match the SDP.
o Reject the changes and return an error via the error callback.
Changes MUST NOT be silently ignored. RTP demux algo goes here
The following elements of the session description MUST NOT be changed 7. Processing RTP packets
between the createOffer and the setLocalDescription (or between the
createAnswer and the setLocalDescription), since they 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. Note: The following algorithm does not yet have WG consensus but is
included here as something concrete for the working group to discuss.
o The generated MID attributes (a=mid). When an RTP packet is received by a transport and passes SRTP
authentication, that packet needs to be routed to the correct
RtpReceiver. For each transport, the following steps MUST be
followed to prepare to route packets:
o The generated ICE credentials (a=ice-ufrag and a=ice-pwd). Construct a table mapping MID to RtpReceiver for each RtpReceiver
configured to receive from this transport.
o The set of ICE candidates and their parameters (a=candidate). Construct a table mapping SSRC to RtpReceiver for each RtpReceiver
configured to receive from this transport and for each SSRC that
RtpReceiver is configured to receive. Some of the SSRCs may be
presesnt in the m= section corresponding to that RtpReceiver in
the remote description.
o The DTLS fingerprint(s) (a=fingerprint). Construct a table mapping payload type to RtpReceiver for each
RtpReceiver configured to receive from this transport and for each
payload type that RtpReceiver is configured to receive. The
payload types of a given RtpReceiver are found in the m= section
corresponding to that RtpReceiver in the local description. If
any payload type could map to more than one RtpReceiver, map to
the RtpReceiver whose m= section appears earliest in the local
description.
o The contents of bundle groups, bundle-only parameters, or "a=rtcp- For each RTP packet received, the following steps MUST be followed to
mux" parameters. route the packet:
The following modifications, if done by the browser to a description If the packet has a MID and that MID is not in the table mapping
between createOffer/createAnswer and the setLocalDescription, MUST be MID to RtpReceiver, drop the packet and stop.
honored by the browser:
o Remove or reorder codecs (m=) If the packet has a MID and that MID is in the table mapping MID
to RtpReceiver, update the SSRC mapping table to include an entry
mapping the packet's SSRC to the RtpReceiver.
The following parameters may be controlled by options passed into If the packet's SSRC is in the SSRC mapping table, route the
createOffer/createAnswer. As an open issue, these changes may also packet to the mapped RtpReceiver and stop.
be be performed by manipulating the SDP returned from createOffer/
createAnswer, as indicated above, as long as the capabilities of the
endpoint are not exceeded (e.g. asking for a resolution greater than
what the endpoint can encode):
o [[OPEN ISSUE: This is a placeholder for other modifications, which If the packet's payload type is in the payload type table, update
we may continue adding as use cases appear.]] the the SSRC mapping table to include an entry mapping the
packet's SSRC to the RtpReceiver. Deliver the packet to the
RtpReceiver and stop.
Implementations MAY choose to either honor or reject any elements not Otherwise, drop the packet.
listed in the above two categories, but must do so explicitly as
described at the beginning of this section. Note that future
standards may add new SDP elements to the list of elements which must
be accepted or rejected, but due to version skew, applications must
be prepared for implementations to accept changes which must be
rejected and vice versa.
The application can also modify the SDP to reduce the capabilities in After packets are routed to the RtpReceiver, further processing of
the offer it sends to the far side or the offer that it installs from the RTP packets is done at the RtpReceiver level. This includes
the far side in any way the application sees fit, as long as it is a using [I-D.ietf-mmusic-rid] to determine which RTP streams depend on
valid SDP offer and specifies a subset of what was in the original or repair other RTP streams.
offer. This is safe because the answer is not permitted to expand
capabilities and therefore will just respond to what is actually in
the offer.
As always, the application is solely responsible for what it sends to As RtpTransceivers (and, thus, RtpReceivers) are added, removed,
the other party, and all incoming SDP will be processed by the stopped, or reconfigured, the tables above must also be updated.
browser to the extent of its capabilities. It is an error to assume
that all SDP is well-formed; however, one should be able to assume
that any implementation of this specification will be able to
process, as a remote offer or answer, unmodified SDP coming from any
other implementation of this specification.
7. Examples 8. Examples
Note that this example section shows several SDP fragments. To Note that this example section shows several SDP fragments. To
format in 72 columns, some of the lines in SDP have been split into format in 72 columns, some of the lines in SDP have been split into
multiple lines, where leading whitespace indicates that a line is a multiple lines, where leading whitespace indicates that a line is a
continuation of the previous line. In addition, some blank lines continuation of the previous line. In addition, some blank lines
have been added to improve readability but are not valid in SDP. have been added to improve readability but are not valid in SDP.
More examples of SDP for WebRTC call flows can be found in More examples of SDP for WebRTC call flows can be found in
[I-D.nandakumar-rtcweb-sdp]. [I-D.nandakumar-rtcweb-sdp].
7.1. Simple Example 8.1. Simple Example
This section shows a very simple example that sets up a minimal audio This section shows a very simple example that sets up a minimal audio
/ video call between two browsers and does not use trickle ICE. The / video call between two browsers and does not use trickle ICE. The
example in the following section provides a more realistic example of example in the following section provides a more realistic example of
what would happen in a normal browser to browser connection. what would happen in a normal browser to browser connection.
The flow shows Alice's browser initiating the session to Bob's The flow shows Alice's browser initiating the session to Bob's
browser. The messages from Alice's JS to Bob's JS are assumed to browser. The messages from Alice's JS to Bob's JS are assumed to
flow over some signaling protocol via a web server. The JS on both flow over some signaling protocol via a web server. The JS on both
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
skipping to change at page 67, line 32 skipping to change at page 70, line 30
a=setup:active a=setup:active
a=rtcp-mux a=rtcp-mux
a=rtcp-rsize a=rtcp-rsize
a=rtcp-fb:100 ccm fir a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli a=rtcp-fb:100 nack pli
a=ssrc:3229706345 cname:Q/NWs1ao1HmN4Xa5 a=ssrc:3229706345 cname:Q/NWs1ao1HmN4Xa5
a=ssrc:3229706346 cname:Q/NWs1ao1HmN4Xa5 a=ssrc:3229706346 cname:Q/NWs1ao1HmN4Xa5
a=ssrc-group:FID 3229706345 3229706346 a=ssrc-group:FID 3229706345 3229706346
7.2. Normal Examples 8.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 bundle policy of max-bundle, an is used in full trickle mode with a bundle policy of max-bundle, an
RTCP mux policy of require, and a single TURN server. Later, two RTCP mux policy of require, and a single TURN server. Later, two
video flows, one for the presenter and one for screen sharing, are video flows, one for the presenter and one for screen sharing, are
added to the session. This example shows Alice's browser initiating added to the session. This example shows Alice's browser initiating
the session to Bob's browser. The messages from Alice's JS to Bob's the session to Bob's browser. The messages from Alice's JS to Bob's
JS are assumed to flow over some signaling protocol via a web server. JS are assumed to flow over some signaling protocol via a web server.
skipping to change at page 77, line 14 skipping to change at page 80, line 14
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:passive a=setup:passive
a=rtcp-mux a=rtcp-mux
a=rtcp-rsize a=rtcp-rsize
a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:2 urn:ietf:params:rtp-hdrext:sdes:mid
a=rtcp-fb:100 ccm fir a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli a=rtcp-fb:100 nack pli
8. Security Considerations 9. Security Considerations
The IETF has published separate documents The IETF has published separate documents
[I-D.ietf-rtcweb-security-arch] [I-D.ietf-rtcweb-security] describing [I-D.ietf-rtcweb-security-arch] [I-D.ietf-rtcweb-security] describing
the security architecture for WebRTC as a whole. The remainder of the security architecture for WebRTC as a whole. The remainder of
this section describes security considerations for this document. this section describes security considerations for this document.
While formally the JSEP interface is an API, it is better to think of While formally the JSEP interface is an API, it is better to think of
it is an Internet protocol, with the JS being untrustworthy from the it is an Internet protocol, with the JS being untrustworthy from the
perspective of the browser. Thus, the threat model of [RFC3552] perspective of the browser. Thus, the threat model of [RFC3552]
applies. In particular, JS can call the API in any order and with applies. In particular, JS can call the API in any order and with
any inputs, including malicious ones. This is particularly relevant any inputs, including malicious ones. This is particularly relevant
when we consider the SDP which is passed to setLocalDescription(). when we consider the SDP which is passed to setLocalDescription().
While correct API usage requires that the application pass in SDP While correct API usage requires that the application pass in SDP
which was derived from createOffer() or createAnswer() (perhaps which was derived from createOffer() or createAnswer(), there is no
suitably modified as described in Section 6, there is no guarantee guarantee that applications do so. The browser MUST be prepared for
that applications do so. The browser MUST be prepared for the JS to the JS to pass in bogus data instead.
pass in bogus data instead.
Conversely, the application programmer MUST recognize that the JS Conversely, the application programmer MUST recognize that the JS
does not have complete control of browser behavior. One case that does not have complete control of browser behavior. One case that
bears particular mention is that editing ICE candidates out of the bears particular mention is that editing ICE candidates out of the
SDP or suppressing trickled candidates does not have the expected SDP or suppressing trickled candidates does not have the expected
behavior: implementations will still perform checks from those behavior: implementations will still perform checks from those
candidates even if they are not sent to the other side. Thus, for candidates even if they are not sent to the other side. Thus, for
instance, it is not possible to prevent the remote peer from learning instance, it is not possible to prevent the remote peer from learning
your public IP address by removing server reflexive candidates. your public IP address by removing server reflexive candidates.
Applications which wish to conceal their public IP address should Applications which wish to conceal their public IP address should
instead configure the ICE agent to use only relay candidates. instead configure the ICE agent to use only relay candidates.
9. IANA Considerations 10. IANA Considerations
This document requires no actions from IANA. This document requires no actions from IANA.
10. Acknowledgements 11. Acknowledgements
Significant text incorporated in the draft as well and review was Significant text incorporated in the draft as well and review was
provided by Peter Thatcher, Taylor Brandstetter, Harald Alvestrand provided by Peter Thatcher, Taylor Brandstetter, Harald Alvestrand
and Suhas Nandakumar. Dan Burnett, Neil Stratford, Anant Narayanan, and Suhas Nandakumar. Dan Burnett, Neil Stratford, Anant Narayanan,
Andrew Hutton, Richard Ejzak, Adam Bergkvist and Matthew Kaufman all Andrew Hutton, Richard Ejzak, Adam Bergkvist and Matthew Kaufman all
provided valuable feedback on this proposal. provided valuable feedback on this proposal.
11. References 12. References
11.1. Normative References 12.1. Normative References
[I-D.ietf-avtext-rid] [I-D.ietf-avtext-rid]
Roach, A., Nandakumar, S., and P. Thatcher, "RTP Stream Roach, A., Nandakumar, S., and P. Thatcher, "RTP Stream
Identifier (RID) Source Description (SDES)", draft-ietf- Identifier (RID) Source Description (SDES)", draft-ietf-
avtext-rid-00 (work in progress), February 2016. avtext-rid-00 (work in progress), February 2016.
[I-D.ietf-ice-trickle] [I-D.ietf-ice-trickle]
Ivov, E., Rescorla, E., Uberti, J., and P. Saint-Andre, Ivov, E., Rescorla, E., Uberti, J., and P. Saint-Andre,
"Trickle ICE: Incremental Provisioning of Candidates for "Trickle ICE: Incremental Provisioning of Candidates for
the Interactive Connectivity Establishment (ICE) the Interactive Connectivity Establishment (ICE)
Protocol". Protocol".
[I-D.ietf-mmusic-4572-update]
Holmberg, C., "Updates to RFC 4572", draft-ietf-mmusic-
4572-update-05 (work in progress), June 2016.
[I-D.ietf-mmusic-msid] [I-D.ietf-mmusic-msid]
Alvestrand, H., "Cross Session Stream Identification in Alvestrand, H., "Cross Session Stream Identification in
the Session Description Protocol", draft-ietf-mmusic- the Session Description Protocol", draft-ietf-mmusic-
msid-01 (work in progress), August 2013. msid-01 (work in progress), August 2013.
[I-D.ietf-mmusic-mux-exclusive]
Holmberg, C., "Indicating Exclusive Support of RTP/RTCP
Multiplexing using SDP", draft-ietf-mmusic-mux-
exclusive-08 (work in progress), June 2016.
[I-D.ietf-mmusic-rid] [I-D.ietf-mmusic-rid]
Thatcher, P., Zanaty, M., Nandakumar, S., Burman, B., Thatcher, P., Zanaty, M., Nandakumar, S., Burman, B.,
Roach, A., and B. Campen, "RTP Payload Format Roach, A., and B. Campen, "RTP Payload Format
Constraints", draft-ietf-mmusic-rid-04 (work in progress), Constraints", draft-ietf-mmusic-rid-04 (work in progress),
February 2016. February 2016.
[I-D.ietf-mmusic-sctp-sdp] [I-D.ietf-mmusic-sctp-sdp]
Loreto, S. and G. Camarillo, "Stream Control Transmission Loreto, S. and G. Camarillo, "Stream Control Transmission
Protocol (SCTP)-Based Media Transport in the Session Protocol (SCTP)-Based Media Transport in the Session
Description Protocol (SDP)", draft-ietf-mmusic-sctp-sdp-04 Description Protocol (SDP)", draft-ietf-mmusic-sctp-sdp-04
skipping to change at page 81, line 19 skipping to change at page 84, line 30
Attributes in the Session Description Protocol (SDP)", Attributes in the Session Description Protocol (SDP)",
RFC 6236, May 2011. RFC 6236, May 2011.
[RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer
Security Version 1.2", RFC 6347, January 2012. 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.
11.2. Informative References 12.2. Informative References
[I-D.ietf-rtcweb-ip-handling] [I-D.ietf-rtcweb-ip-handling]
Uberti, J. and G. Shieh, "WebRTC IP Address Handling Uberti, J. and G. Shieh, "WebRTC IP Address Handling
Recommendations", draft-ietf-rtcweb-ip-handling-01 (work Recommendations", draft-ietf-rtcweb-ip-handling-01 (work
in progress), March 2016. in progress), March 2016.
[I-D.nandakumar-rtcweb-sdp] [I-D.nandakumar-rtcweb-sdp]
Nandakumar, S. and C. Jennings, "SDP for the WebRTC", Nandakumar, S. and C. Jennings, "SDP for the WebRTC",
draft-nandakumar-rtcweb-sdp-02 (work in progress), July draft-nandakumar-rtcweb-sdp-02 (work in progress), July
2013. 2013.
skipping to change at page 82, line 39 skipping to change at page 85, line 51
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-16:
o Update addIceCandidate to indicate ICE generation and allow per-m=
section end-of-candidates.
o Update fingerprint handling to use draft-ietf-mmusic-4572-update.
o Update text around SDP processing of RTP header extensions and
payload formats.
o Add sections on simulcast, addTransceiver, and createDataChannel.
o Clarify text to ensure that the session ID is a positive 63 bit
integer.
o Clarify SDP processing for direction indication.
o Describe SDP processing for rtcp-mux-only.
o Specify how SDP session version in o= line.
o Require that when doing an re-offer, the capabilities of the new
session are mostly required to be a subset of the previously
negotiated session.
o Clarified ICE restart interaction with bundle-only.
o Remove support for changing SDP before calling
setLocalDescription.
o Specify algorithm for demuxing RTP based on MID, PT, and SSRC.
o Clarify rules for rejecting m= lines when bundle policy is
balanced or max-bundle.
Changes in draft-15: Changes in draft-15:
o Clarify text around codecs offered in subsequent transactions to o Clarify text around codecs offered in subsequent transactions to
refer to what's been negotiated. refer to what's been negotiated.
o Rewrite LS handling text to indicate edge cases and that we're o Rewrite LS handling text to indicate edge cases and that we're
living with them. living with them.
o Require that answerer reject m= lines when there are no codecs in o Require that answerer reject m= lines when there are no codecs in
common. common.
skipping to change at page 87, line 40 skipping to change at page 91, line 40
Justin Uberti Justin Uberti
Google Google
747 6th St S 747 6th St S
Kirkland, WA 98033 Kirkland, WA 98033
USA USA
Email: justin@uberti.name Email: justin@uberti.name
Cullen Jennings Cullen Jennings
Cisco Cisco
170 West Tasman Drive 400 3rd Avenue SW
San Jose, CA 95134 Calgary, AB T2P 4H2
USA Canada
Email: fluffy@iii.ca Email: fluffy@iii.ca
Eric Rescorla (editor) Eric Rescorla (editor)
Mozilla Mozilla
331 Evelyn Ave 331 Evelyn Ave
Mountain View, CA 94041 Mountain View, CA 94041
USA USA
Email: ekr@rtfm.com Email: ekr@rtfm.com
 End of changes. 99 change blocks. 
295 lines changed or deleted 471 lines changed or added

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