draft-ietf-rtcweb-jsep-13.txt | draft-ietf-rtcweb-jsep-14.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: September 10, 2016 Cisco | Expires: September 22, 2016 Cisco | |||
E. Rescorla, Ed. | E. Rescorla, Ed. | |||
Mozilla | Mozilla | |||
March 9, 2016 | March 21, 2016 | |||
Javascript Session Establishment Protocol | Javascript Session Establishment Protocol | |||
draft-ietf-rtcweb-jsep-13 | draft-ietf-rtcweb-jsep-14 | |||
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 September 10, 2016. | This Internet-Draft will expire on September 22, 2016. | |||
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 | |||
carefully, as they describe your rights and restrictions with respect | carefully, as they describe your rights and restrictions with respect | |||
to this document. Code Components extracted from this document must | to this document. Code Components extracted from this document must | |||
include Simplified BSD License text as described in Section 4.e of | include Simplified BSD License text as described in Section 4.e of | |||
the Trust Legal Provisions and are provided without warranty as | the Trust Legal Provisions and are provided without warranty as | |||
described in the Simplified BSD License. | described in the Simplified BSD License. | |||
Table of Contents | Table of Contents | |||
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 | |||
1.1. General Design of JSEP . . . . . . . . . . . . . . . . . 3 | 1.1. General Design of JSEP . . . . . . . . . . . . . . . . . 4 | |||
1.2. Other Approaches Considered . . . . . . . . . . . . . . . 5 | 1.2. Other Approaches Considered . . . . . . . . . . . . . . . 5 | |||
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 6 | 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 6 | |||
3. Semantics and Syntax . . . . . . . . . . . . . . . . . . . . 6 | 3. Semantics and Syntax . . . . . . . . . . . . . . . . . . . . 6 | |||
3.1. Signaling Model . . . . . . . . . . . . . . . . . . . . . 6 | 3.1. Signaling Model . . . . . . . . . . . . . . . . . . . . . 6 | |||
3.2. Session Descriptions and State Machine . . . . . . . . . 7 | 3.2. Session Descriptions and State Machine . . . . . . . . . 7 | |||
3.3. Session Description Format . . . . . . . . . . . . . . . 10 | 3.3. Session Description Format . . . . . . . . . . . . . . . 10 | |||
3.4. ICE . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 | 3.4. Session Description Control . . . . . . . . . . . . . . . 10 | |||
3.4.1. ICE Gathering Overview . . . . . . . . . . . . . . . 10 | 3.4.1. RtpTransceivers . . . . . . . . . . . . . . . . . . . 10 | |||
3.4.2. ICE Candidate Trickling . . . . . . . . . . . . . . . 11 | 3.4.2. RtpSenders . . . . . . . . . . . . . . . . . . . . . 11 | |||
3.4.2.1. ICE Candidate Format . . . . . . . . . . . . . . 12 | 3.4.3. RtpReceivers . . . . . . . . . . . . . . . . . . . . 11 | |||
3.4.3. ICE Candidate Policy . . . . . . . . . . . . . . . . 12 | 3.5. ICE . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 | |||
3.4.4. ICE Candidate Pool . . . . . . . . . . . . . . . . . 13 | 3.5.1. ICE Gathering Overview . . . . . . . . . . . . . . . 11 | |||
3.5. Video Size Negotiation . . . . . . . . . . . . . . . . . 14 | 3.5.2. ICE Candidate Trickling . . . . . . . . . . . . . . . 12 | |||
3.5.1. Creating an imageattr Attribute . . . . . . . . . . . 14 | 3.5.2.1. ICE Candidate Format . . . . . . . . . . . . . . 12 | |||
3.5.2. Interpreting an imageattr Attribute . . . . . . . . . 15 | 3.5.3. ICE Candidate Policy . . . . . . . . . . . . . . . . 13 | |||
3.6. Interactions With Forking . . . . . . . . . . . . . . . . 16 | 3.5.4. ICE Candidate Pool . . . . . . . . . . . . . . . . . 14 | |||
3.6.1. Sequential Forking . . . . . . . . . . . . . . . . . 16 | 3.6. Video Size Negotiation . . . . . . . . . . . . . . . . . 14 | |||
3.6.2. Parallel Forking . . . . . . . . . . . . . . . . . . 17 | 3.6.1. Creating an imageattr Attribute . . . . . . . . . . . 14 | |||
3.6.2. Interpreting an imageattr Attribute . . . . . . . . . 15 | ||||
3.7. Interactions With Forking . . . . . . . . . . . . . . . . 17 | ||||
3.7.1. Sequential Forking . . . . . . . . . . . . . . . . . 17 | ||||
3.7.2. Parallel Forking . . . . . . . . . . . . . . . . . . 18 | ||||
4. Interface . . . . . . . . . . . . . . . . . . . . . . . . . . 18 | 4. Interface . . . . . . . . . . . . . . . . . . . . . . . . . . 18 | |||
4.1. Methods . . . . . . . . . . . . . . . . . . . . . . . . . 18 | 4.1. Methods . . . . . . . . . . . . . . . . . . . . . . . . . 19 | |||
4.1.1. Constructor . . . . . . . . . . . . . . . . . . . . . 18 | 4.1.1. Constructor . . . . . . . . . . . . . . . . . . . . . 19 | |||
4.1.2. createOffer . . . . . . . . . . . . . . . . . . . . . 20 | 4.1.2. createOffer . . . . . . . . . . . . . . . . . . . . . 21 | |||
4.1.3. createAnswer . . . . . . . . . . . . . . . . . . . . 21 | 4.1.3. createAnswer . . . . . . . . . . . . . . . . . . . . 22 | |||
4.1.4. SessionDescriptionType . . . . . . . . . . . . . . . 22 | 4.1.4. SessionDescriptionType . . . . . . . . . . . . . . . 22 | |||
4.1.4.1. Use of Provisional Answers . . . . . . . . . . . 22 | 4.1.4.1. Use of Provisional Answers . . . . . . . . . . . 23 | |||
4.1.4.2. Rollback . . . . . . . . . . . . . . . . . . . . 23 | 4.1.4.2. Rollback . . . . . . . . . . . . . . . . . . . . 24 | |||
4.1.5. setLocalDescription . . . . . . . . . . . . . . . . . 24 | 4.1.5. setLocalDescription . . . . . . . . . . . . . . . . . 25 | |||
4.1.6. setRemoteDescription . . . . . . . . . . . . . . . . 24 | 4.1.6. setRemoteDescription . . . . . . . . . . . . . . . . 25 | |||
4.1.7. currentLocalDescription . . . . . . . . . . . . . . . 25 | 4.1.7. currentLocalDescription . . . . . . . . . . . . . . . 26 | |||
4.1.8. pendingLocalDescription . . . . . . . . . . . . . . . 25 | 4.1.8. pendingLocalDescription . . . . . . . . . . . . . . . 26 | |||
4.1.9. currentRemoteDescription . . . . . . . . . . . . . . 25 | 4.1.9. currentRemoteDescription . . . . . . . . . . . . . . 26 | |||
4.1.10. pendingRemoteDescription . . . . . . . . . . . . . . 25 | 4.1.10. pendingRemoteDescription . . . . . . . . . . . . . . 26 | |||
4.1.11. canTrickleIceCandidates . . . . . . . . . . . . . . . 26 | 4.1.11. canTrickleIceCandidates . . . . . . . . . . . . . . . 27 | |||
4.1.12. setConfiguration . . . . . . . . . . . . . . . . . . 26 | 4.1.12. setConfiguration . . . . . . . . . . . . . . . . . . 27 | |||
4.1.13. addIceCandidate . . . . . . . . . . . . . . . . . . . 27 | 4.1.13. addIceCandidate . . . . . . . . . . . . . . . . . . . 28 | |||
5. SDP Interaction Procedures . . . . . . . . . . . . . . . . . 27 | 5. SDP Interaction Procedures . . . . . . . . . . . . . . . . . 28 | |||
5.1. Requirements Overview . . . . . . . . . . . . . . . . . . 27 | 5.1. Requirements Overview . . . . . . . . . . . . . . . . . . 28 | |||
5.1.1. Implementation Requirements . . . . . . . . . . . . . 28 | 5.1.1. Implementation Requirements . . . . . . . . . . . . . 29 | |||
5.1.2. Usage Requirements . . . . . . . . . . . . . . . . . 29 | 5.1.2. Usage Requirements . . . . . . . . . . . . . . . . . 30 | |||
5.1.3. Profile Names and Interoperability . . . . . . . . . 29 | 5.1.3. Profile Names and Interoperability . . . . . . . . . 30 | |||
5.2. Constructing an Offer . . . . . . . . . . . . . . . . . . 30 | 5.2. Constructing an Offer . . . . . . . . . . . . . . . . . . 31 | |||
5.2.1. Initial Offers . . . . . . . . . . . . . . . . . . . 30 | 5.2.1. Initial Offers . . . . . . . . . . . . . . . . . . . 31 | |||
5.2.2. Subsequent Offers . . . . . . . . . . . . . . . . . . 35 | 5.2.2. Subsequent Offers . . . . . . . . . . . . . . . . . . 37 | |||
5.2.3. Options Handling . . . . . . . . . . . . . . . . . . 38 | 5.2.3. Options Handling . . . . . . . . . . . . . . . . . . 40 | |||
5.2.3.1. OfferToReceiveAudio . . . . . . . . . . . . . . . 38 | 5.2.3.1. IceRestart . . . . . . . . . . . . . . . . . . . 40 | |||
5.2.3.2. OfferToReceiveVideo . . . . . . . . . . . . . . . 39 | 5.2.3.2. VoiceActivityDetection . . . . . . . . . . . . . 40 | |||
5.2.3.3. IceRestart . . . . . . . . . . . . . . . . . . . 39 | 5.2.4. Direction Attribute in Offers . . . . . . . . . . . . 41 | |||
5.2.3.4. VoiceActivityDetection . . . . . . . . . . . . . 39 | 5.3. Generating an Answer . . . . . . . . . . . . . . . . . . 41 | |||
5.3. Generating an Answer . . . . . . . . . . . . . . . . . . 40 | 5.3.1. Initial Answers . . . . . . . . . . . . . . . . . . . 42 | |||
5.3.1. Initial Answers . . . . . . . . . . . . . . . . . . . 40 | 5.3.2. Subsequent Answers . . . . . . . . . . . . . . . . . 46 | |||
5.3.2. Subsequent Answers . . . . . . . . . . . . . . . . . 45 | 5.3.3. Options Handling . . . . . . . . . . . . . . . . . . 47 | |||
5.3.3. Options Handling . . . . . . . . . . . . . . . . . . 46 | 5.3.3.1. VoiceActivityDetection . . . . . . . . . . . . . 47 | |||
5.3.3.1. VoiceActivityDetection . . . . . . . . . . . . . 46 | 5.3.4. Direction Attribute in Answers . . . . . . . . . . . 47 | |||
5.4. Processing a Local Description . . . . . . . . . . . . . 46 | 5.4. Processing a Local Description . . . . . . . . . . . . . 48 | |||
5.5. Processing a Remote Description . . . . . . . . . . . . . 47 | 5.5. Processing a Remote Description . . . . . . . . . . . . . 48 | |||
5.6. Parsing a Session Description . . . . . . . . . . . . . . 47 | 5.6. Parsing a Session Description . . . . . . . . . . . . . . 49 | |||
5.6.1. Session-Level Parsing . . . . . . . . . . . . . . . . 48 | 5.6.1. Session-Level Parsing . . . . . . . . . . . . . . . . 50 | |||
5.6.2. Media Section Parsing . . . . . . . . . . . . . . . . 50 | 5.6.2. Media Section Parsing . . . . . . . . . . . . . . . . 52 | |||
5.6.3. Semantics Verification . . . . . . . . . . . . . . . 52 | 5.6.3. Semantics Verification . . . . . . . . . . . . . . . 54 | |||
5.7. Applying a Local Description . . . . . . . . . . . . . . 53 | 5.7. Applying a Local Description . . . . . . . . . . . . . . 55 | |||
5.8. Applying a Remote Description . . . . . . . . . . . . . . 54 | 5.8. Applying a Remote Description . . . . . . . . . . . . . . 57 | |||
5.9. Applying an Answer . . . . . . . . . . . . . . . . . . . 56 | 5.9. Applying an Answer . . . . . . . . . . . . . . . . . . . 59 | |||
6. Configurable SDP Parameters . . . . . . . . . . . . . . . . . 57 | 6. Configurable SDP Parameters . . . . . . . . . . . . . . . . . 60 | |||
7. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 59 | 7. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . 62 | |||
7.1. Simple Example . . . . . . . . . . . . . . . . . . . . . 59 | 7.1. Simple Example . . . . . . . . . . . . . . . . . . . . . 62 | |||
7.2. Normal Examples . . . . . . . . . . . . . . . . . . . . . 63 | 7.2. Normal Examples . . . . . . . . . . . . . . . . . . . . . 66 | |||
8. Security Considerations . . . . . . . . . . . . . . . . . . . 72 | 8. Security Considerations . . . . . . . . . . . . . . . . . . . 75 | |||
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 72 | 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 75 | |||
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 72 | 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 75 | |||
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 73 | 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 76 | |||
11.1. Normative References . . . . . . . . . . . . . . . . . . 73 | 11.1. Normative References . . . . . . . . . . . . . . . . . . 76 | |||
11.2. Informative References . . . . . . . . . . . . . . . . . 75 | 11.2. Informative References . . . . . . . . . . . . . . . . . 78 | |||
Appendix A. Change log . . . . . . . . . . . . . . . . . . . . . 77 | Appendix A. Change log . . . . . . . . . . . . . . . . . . . . . 80 | |||
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 81 | Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 85 | |||
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 10, line 31 ¶ | skipping to change at page 10, line 31 ¶ | |||
to generate and consume that JSON. | to generate and consume that JSON. | |||
Other methods may be added to SessionDescription in the future to | Other methods may be added to SessionDescription in the future to | |||
simplify handling of SessionDescriptions from Javascript. In the | simplify handling of SessionDescriptions from Javascript. In the | |||
meantime, Javascript libraries can be used to perform these | meantime, Javascript libraries can be used to perform these | |||
manipulations. | manipulations. | |||
Note that most applications should be able to treat the | Note that most applications should be able to treat the | |||
SessionDescriptions produced and consumed by these various API calls | SessionDescriptions produced and consumed by these various API calls | |||
as opaque blobs; that is, the application will not need to read or | as opaque blobs; that is, the application will not need to read or | |||
change them. The W3C WebRTC API specification will provide | change them. | |||
appropriate APIs to allow the application to control various session | ||||
parameters, which will provide the necessary information to the | ||||
browser about what sort of SessionDescription to produce. | ||||
3.4. ICE | 3.4. Session Description Control | |||
3.4.1. ICE Gathering Overview | In order to give the application control over various common session | |||
parameters, JSEP provides control surfaces which tell the browser how | ||||
to generate session descriptions. This avoids the need for | ||||
Javascript to modify session descriptions in most cases. | ||||
Changes to these objects result in changes to the session | ||||
descriptions generated by subsequent createOffer/Answer calls. | ||||
3.4.1. RtpTransceivers | ||||
RtpTransceivers allow the application to control the RTP media | ||||
associated with one m= section. Each RtpTransceiver has an RtpSender | ||||
and an RtpReceiver, which an application can use to control the | ||||
sending and receiving of RTP media. The application may also modify | ||||
the RtpTransceiver directly, for instance, by stopping it. | ||||
RtpTransceivers generally have a 1:1 mapping with m= sections, | ||||
although there may be more RtpTransceivers than m= sections when | ||||
RtpTransceivers are created but not yet associated with a m= section, | ||||
or if RtpTransceivers have been stopped and disassociated from m= | ||||
sections. An RtpTransceiver is never associated with more than one | ||||
m= section, and once a session description is applied, a m= section | ||||
is always associated with exactly one RtpTransceiver. | ||||
RtpTransceivers can be created explicitly by the application or | ||||
implicitly by calling setRemoteDescription with an offer that adds | ||||
new m= sections. | ||||
3.4.2. RtpSenders | ||||
RtpSenders allow the application to control how RTP media is sent. | ||||
In particular, the application can control whether an RtpSender is | ||||
active or not, which affects the directionality attribute of the | ||||
associated m= section. | ||||
3.4.3. RtpReceivers | ||||
RtpReceivers allows the application to control how RTP media is | ||||
received. In particular, the application can control whether an | ||||
RtpReceiver is active or not, which affects the directionality | ||||
attribute of the associated m= section. | ||||
3.5. ICE | ||||
3.5.1. ICE Gathering Overview | ||||
JSEP gathers ICE candidates as needed by the application. Collection | JSEP gathers ICE candidates as needed by the application. Collection | |||
of ICE candidates is referred to as a gathering phase, and this is | of ICE candidates is referred to as a gathering phase, and this is | |||
triggered either by the addition of a new or recycled m= line to the | triggered either by the addition of a new or recycled m= line to the | |||
local session description, or new ICE credentials in the description, | local session description, or new ICE credentials in the description, | |||
indicating an ICE restart. Use of new ICE credentials can be | indicating an ICE restart. Use of new ICE credentials can be | |||
triggered explicitly by the application, or implicitly by the browser | triggered explicitly by the application, or implicitly by the browser | |||
in response to changes in the ICE configuration. | in response to changes in the ICE configuration. | |||
When the ICE configuration changes in a way that requires a new | When the ICE configuration changes in a way that requires a new | |||
skipping to change at page 11, line 23 ¶ | skipping to change at page 12, line 15 ¶ | |||
gathered, an event will be dispatched to signal that the gathering | gathered, an event will be dispatched to signal that the gathering | |||
process is complete. | process is complete. | |||
Note that gathering phases only gather the candidates needed by | Note that gathering phases only gather the candidates needed by | |||
new/recycled/restarting m= lines; other m= lines continue to use | new/recycled/restarting m= lines; other m= lines continue to use | |||
their existing candidates. Also, when bundling is active, candidates | their existing candidates. Also, when bundling is active, candidates | |||
are only gathered (and exchanged) for the m= lines referenced in | are only gathered (and exchanged) for the m= lines referenced in | |||
BUNDLE-tags, as described in | BUNDLE-tags, as described in | |||
[I-D.ietf-mmusic-sdp-bundle-negotiation]. | [I-D.ietf-mmusic-sdp-bundle-negotiation]. | |||
3.4.2. ICE Candidate Trickling | 3.5.2. ICE Candidate Trickling | |||
Candidate trickling is a technique through which a caller may | Candidate trickling is a technique through which a caller may | |||
incrementally provide candidates to the callee after the initial | incrementally provide candidates to the callee after the initial | |||
offer has been dispatched; the semantics of "Trickle ICE" are defined | offer has been dispatched; the semantics of "Trickle ICE" are defined | |||
in [I-D.ietf-ice-trickle]. This process allows the callee to begin | in [I-D.ietf-ice-trickle]. This process allows the callee to begin | |||
acting upon the call and setting up the ICE (and perhaps DTLS) | acting upon the call and setting up the ICE (and perhaps DTLS) | |||
connections immediately, without having to wait for the caller to | connections immediately, without having to wait for the caller to | |||
gather all possible candidates. This results in faster media setup | gather all possible candidates. This results in faster media setup | |||
in cases where gathering is not performed prior to initiating the | in cases where gathering is not performed prior to initiating the | |||
call. | call. | |||
skipping to change at page 12, line 5 ¶ | skipping to change at page 12, line 40 ¶ | |||
trickling can send the initial offer immediately and send individual | trickling can send the initial offer immediately and send individual | |||
candidates when they get the notified of a new candidate; | candidates when they get the notified of a new candidate; | |||
applications that do not support this feature can simply wait for the | applications that do not support this feature can simply wait for the | |||
indication that gathering is complete, and then create and send their | indication that gathering is complete, and then create and send their | |||
offer, with all the candidates, at this time. | offer, with all the candidates, at this time. | |||
Upon receipt of trickled candidates, the receiving application will | Upon receipt of trickled candidates, the receiving application will | |||
supply them to its ICE Agent. This triggers the ICE Agent to start | supply them to its ICE Agent. This triggers the ICE Agent to start | |||
using the new remote candidates for connectivity checks. | using the new remote candidates for connectivity checks. | |||
3.4.2.1. ICE Candidate Format | 3.5.2.1. ICE Candidate Format | |||
As with session descriptions, the syntax of the IceCandidate object | As with session descriptions, the syntax of the IceCandidate object | |||
provides some abstraction, but can be easily converted to and from | provides some abstraction, but can be easily converted to and from | |||
the SDP candidate lines. | the SDP candidate lines. | |||
The candidate lines are the only SDP information that is contained | The candidate lines are the only SDP information that is contained | |||
within IceCandidate, as they represent the only information needed | within IceCandidate, as they represent the only information needed | |||
that is not present in the initial offer (i.e., for trickle | that is not present in the initial offer (i.e., for trickle | |||
candidates). This information is carried with the same syntax as the | candidates). This information is carried with the same syntax as the | |||
"candidate-attribute" field defined for ICE. For example: | "candidate-attribute" field defined for ICE. For example: | |||
skipping to change at page 12, line 31 ¶ | skipping to change at page 13, line 19 ¶ | |||
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 | Implementations receiving an ICE Candidate object MUST use the MID if | |||
present, or the m= line index, if not (as it could have come from a | present, or the m= line index, if not (as it could have come from a | |||
non-JSEP endpoint). | non-JSEP endpoint). | |||
3.4.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 | |||
little location information as possible (note that these choices come | little location information as possible (note that these choices come | |||
with corresponding operational costs). To accomplish this, the | with corresponding operational costs). To accomplish this, the | |||
skipping to change at page 13, line 19 ¶ | skipping to change at page 14, line 7 ¶ | |||
To administer the ICE candidate policy, the browser will determine | To administer the ICE candidate policy, the browser will determine | |||
the current setting at the start of each gathering phase. Then, | the current setting at the start of each gathering phase. Then, | |||
during the gathering phase, the browser MUST NOT expose candidates | during the gathering phase, the browser MUST NOT expose candidates | |||
disallowed by the current policy to the application, use them as the | disallowed by the current policy to the application, use them as the | |||
source of connectivity checks, or indirectly expose them via other | source of connectivity checks, or indirectly expose them via other | |||
fields, such as the raddr/rport attributes for other ICE candidates. | fields, such as the raddr/rport attributes for other ICE candidates. | |||
Later, if a different policy is specified by the application, the | Later, if a different policy is specified by the application, the | |||
application can apply it by kicking off a new gathering phase via an | application can apply it by kicking off a new gathering phase via an | |||
ICE restart. | ICE restart. | |||
3.4.4. ICE Candidate Pool | 3.5.4. ICE Candidate Pool | |||
JSEP applications typically inform the browser to begin ICE gathering | JSEP applications typically inform the browser to begin ICE gathering | |||
via the information supplied to setLocalDescription, as this is where | via the information supplied to setLocalDescription, as this is where | |||
the app specifies the number of media streams, and thereby ICE | the app specifies the number of media streams, and thereby ICE | |||
components, for which to gather candidates. However, to accelerate | components, for which to gather candidates. However, to accelerate | |||
cases where the application knows the number of ICE components to use | cases where the application knows the number of ICE components to use | |||
ahead of time, it may ask the browser to gather a pool of potential | ahead of time, it may ask the browser to gather a pool of potential | |||
ICE candidates to help ensure rapid media setup. | ICE candidates to help ensure rapid media setup. | |||
When setLocalDescription is eventually called, and the browser goes | When setLocalDescription is eventually called, and the browser goes | |||
skipping to change at page 14, line 5 ¶ | skipping to change at page 14, line 36 ¶ | |||
One example of where this concept is useful is an application that | One example of where this concept is useful is an application that | |||
expects an incoming call at some point in the future, and wants to | expects an incoming call at some point in the future, and wants to | |||
minimize the time it takes to establish connectivity, to avoid | minimize the time it takes to establish connectivity, to avoid | |||
clipping of initial media. By pre-gathering candidates into the | clipping of initial media. By pre-gathering candidates into the | |||
pool, it can exchange and start sending connectivity checks from | pool, it can exchange and start sending connectivity checks from | |||
these candidates almost immediately upon receipt of a call. Note | these candidates almost immediately upon receipt of a call. Note | |||
though that by holding on to these pre-gathered candidates, which | though that by holding on to these pre-gathered candidates, which | |||
will be kept alive as long as they may be needed, the application | will be kept alive as long as they may be needed, the application | |||
will consume resources on the STUN/TURN servers it is using. | will consume resources on the STUN/TURN servers it is using. | |||
3.5. Video Size Negotiation | 3.6. Video Size Negotiation | |||
Video size negotiation is the process through which a receiver can | Video size negotiation is the process through which a receiver can | |||
use the "a=imageattr" SDP attribute [RFC6236] to indicate what video | use the "a=imageattr" SDP attribute [RFC6236] to indicate what video | |||
frame sizes it is capable of receiving. A receiver may have hard | frame sizes it is capable of receiving. A receiver may have hard | |||
limits on what its video decoder can process, or it may wish to | limits on what its video decoder can process, or it may wish to | |||
constrain what it receives due to application preferences, e.g. a | constrain what it receives due to application preferences, e.g. a | |||
specific size for the window in which the video will be displayed. | specific size for the window in which the video will be displayed. | |||
3.5.1. Creating an imageattr Attribute | 3.6.1. Creating an imageattr Attribute | |||
In order to determine the limits on what video resolution a receiver | In order to determine the limits on what video resolution a receiver | |||
wants to receive, it will intersect its decoder hard limits with any | wants to receive, it will intersect its decoder hard limits with any | |||
mandatory constraints that have been applied to the associated | mandatory constraints that have been applied to the associated | |||
MediaStreamTrack. If the decoder limits are unknown, e.g. when using | MediaStreamTrack. If the decoder limits are unknown, e.g. when using | |||
a software decoder, the mandatory constraints are used directly. For | a software decoder, the mandatory constraints are used directly. For | |||
the answerer, these mandatory constraints can be applied to the | the answerer, these mandatory constraints can be applied to the | |||
remote MediaStreamTracks that are created by a setRemoteDescription | remote MediaStreamTracks that are created by a setRemoteDescription | |||
call, and will affect the output of the ensuing createAnswer call. | call, and will affect the output of the ensuing createAnswer call. | |||
Any constraints set after setLocalDescription is used to set the | Any constraints set after setLocalDescription is used to set the | |||
skipping to change at page 15, line 15 ¶ | skipping to change at page 15, line 47 ¶ | |||
As an example, consider a system with a HD-capable, multiformat video | As an example, consider a system with a HD-capable, multiformat video | |||
decoder, where the application has constrained the received track to | decoder, where the application has constrained the received track to | |||
at most 360p. In this case, the implemention would generate this | at most 360p. In this case, the implemention would generate this | |||
attribute: | attribute: | |||
a=imageattr:* recv [x=[16:640],y=[16:360],q=1.0] | a=imageattr:* recv [x=[16:640],y=[16:360],q=1.0] | |||
This declaration indicates that the receiver is capable of decoding | This declaration indicates that the receiver is capable of decoding | |||
any image resolution from 16x16 up to 640x360 pixels. | any image resolution from 16x16 up to 640x360 pixels. | |||
3.5.2. Interpreting an imageattr Attribute | 3.6.2. Interpreting an imageattr Attribute | |||
[RFC6236] defines "a=imageattr" to be an advisory field. This means | [RFC6236] defines "a=imageattr" to be an advisory field. This means | |||
that it does not absolutely constrain the video formats that the | that it does not absolutely constrain the video formats that the | |||
sender can use, but gives an indication of the preferred values. | sender can use, but gives an indication of the preferred values. | |||
This specification prescribes more specific behavior. When a sender | This specification prescribes more specific behavior. When a sender | |||
of a given MediaStreamTrack, which is producing video of a certain | of a given MediaStreamTrack, which is producing video of a certain | |||
resolution, receives an "a=imageattr recv" attribute, it MUST check | resolution, receives an "a=imageattr recv" attribute, it MUST check | |||
to see if the original resolution meets the size criteria specified | to see if the original resolution meets the size criteria specified | |||
in the attribute, and adapt the resolution accordingly by scaling (if | in the attribute, and adapt the resolution accordingly by scaling (if | |||
skipping to change at page 16, line 21 ¶ | skipping to change at page 17, line 5 ¶ | |||
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.6. Interactions With Forking | 3.7. 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 16, line 43 ¶ | skipping to change at page 17, line 27 ¶ | |||
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.6.1. Sequential Forking | 3.7.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 17, line 18 ¶ | skipping to change at page 18, line 5 ¶ | |||
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.6.2. Parallel Forking | 3.7.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 18, line 26 ¶ | skipping to change at page 19, line 16 ¶ | |||
4.1.1. Constructor | 4.1.1. Constructor | |||
The PeerConnection constructor allows the application to specify | The PeerConnection constructor allows the application to specify | |||
global parameters for the media session, such as the STUN/TURN | global parameters for the media session, such as the STUN/TURN | |||
servers and credentials to use when gathering candidates, as well as | servers and credentials to use when gathering candidates, as well as | |||
the initial ICE candidate policy and pool size, and also the bundle | the initial ICE candidate policy and pool size, and also the bundle | |||
policy to use. | policy to use. | |||
If an ICE candidate policy is specified, it functions as described in | If an ICE candidate policy is specified, it functions as described in | |||
Section 3.4.3, causing the browser to only surface the permitted | Section 3.5.3, causing the browser to only surface the permitted | |||
candidates (including any internal browser filtering) to the | candidates (including any internal browser filtering) to the | |||
application, and only use those candidates for connectivity checks. | application, and only use those candidates for connectivity checks. | |||
The set of available policies is as follows: | The set of available policies is as follows: | |||
all: All candidates permitted by browser policy will be gathered and | all: All candidates permitted by browser policy will be gathered and | |||
used. | used. | |||
relay: All candidates except relay candidates will be filtered out. | relay: All candidates except relay candidates will be filtered out. | |||
This obfuscates the location information that might be ascertained | This obfuscates the location information that might be ascertained | |||
by the remote peer from the received candidates. Depending on how | by the remote peer from the received candidates. Depending on how | |||
skipping to change at page 20, line 22 ¶ | skipping to change at page 21, line 9 ¶ | |||
does not provide an "a=rtcp-mux" attribute. | does not provide an "a=rtcp-mux" attribute. | |||
The default multiplexing policy MUST be set to "require". | The default multiplexing policy MUST be set to "require". | |||
Implementations MAY choose to reject attempts by the application to | Implementations MAY choose to reject attempts by the application to | |||
set the multiplexing policy to "negotiate". | set the multiplexing policy to "negotiate". | |||
4.1.2. createOffer | 4.1.2. createOffer | |||
The createOffer method generates a blob of SDP that contains a | The createOffer method generates a blob of SDP that contains a | |||
[RFC3264] offer with the supported configurations for the session, | [RFC3264] offer with the supported configurations for the session, | |||
including descriptions of the local MediaStreams attached to this | including descriptions of the media added to this PeerConnection, the | |||
PeerConnection, the codec/RTP/RTCP options supported by this | codec/RTP/RTCP options supported by this implementation, and any | |||
implementation, and any candidates that have been gathered by the ICE | candidates that have been gathered by the ICE Agent. An options | |||
Agent. An options parameter may be supplied to provide additional | parameter may be supplied to provide additional control over the | |||
control over the generated offer. This options parameter should | generated offer. This options parameter allows an application to | |||
allow for the following manipulations to be performed: | trigger an ICE restart, for the purpose of reestablishing | |||
connectivity. | ||||
o To indicate support for a media type even if no MediaStreamTracks | ||||
of that type have been added to the session (e.g., an audio call | ||||
that wants to receive video.) | ||||
o To trigger an ICE restart, for the purpose of reestablishing | ||||
connectivity. | ||||
In the initial offer, the generated SDP will contain all desired | In the initial offer, the generated SDP will contain all desired | |||
functionality for the session (functionality that is supported but | functionality for the session (functionality that is supported but | |||
not desired by default may be omitted); for each SDP line, the | not desired by default may be omitted); for each SDP line, the | |||
generation of the SDP will follow the process defined for generating | generation of the SDP will follow the process defined for generating | |||
an initial offer from the document that specifies the given SDP line. | an initial offer from the document that specifies the given SDP line. | |||
The exact handling of initial offer generation is detailed in | The exact handling of initial offer generation is detailed in | |||
Section 5.2.1 below. | Section 5.2.1 below. | |||
In the event createOffer is called after the session is established, | In the event createOffer is called after the session is established, | |||
createOffer will generate an offer to modify the current session | createOffer will generate an offer to modify the current session | |||
based on any changes that have been made to the session, e.g. adding | based on any changes that have been made to the session, e.g., adding | |||
or removing MediaStreams, or requesting an ICE restart. For each | or stopping RtpTransceivers, or requesting an ICE restart. For each | |||
existing stream, the generation of each SDP line must follow the | existing stream, the generation of each SDP line must follow the | |||
process defined for generating an updated offer from the RFC that | process defined for generating an updated offer from the RFC that | |||
specifies the given SDP line. For each new stream, the generation of | specifies the given SDP line. For each new stream, the generation of | |||
the SDP must follow the process of generating an initial offer, as | the SDP must follow the process of generating an initial offer, as | |||
mentioned above. If no changes have been made, or for SDP lines that | mentioned above. If no changes have been made, or for SDP lines that | |||
are unaffected by the requested changes, the offer will only contain | are unaffected by the requested changes, the offer will only contain | |||
the parameters negotiated by the last offer-answer exchange. The | the parameters negotiated by the last offer-answer exchange. The | |||
exact handling of subsequent offer generation is detailed in | exact handling of subsequent offer generation is detailed in | |||
Section 5.2.2. below. | Section 5.2.2. below. | |||
skipping to change at page 21, line 29 ¶ | skipping to change at page 22, line 12 ¶ | |||
credentials, but does not result in candidate gathering, or cause | credentials, but does not result in candidate gathering, or cause | |||
media to start or stop flowing. | media to start or stop flowing. | |||
4.1.3. createAnswer | 4.1.3. createAnswer | |||
The createAnswer method generates a blob of SDP that contains a | The createAnswer method generates a blob of SDP that contains a | |||
[RFC3264] SDP answer with the supported configuration for the session | [RFC3264] SDP answer with the supported configuration for the session | |||
that is compatible with the parameters supplied in the most recent | that is compatible with the parameters supplied in the most recent | |||
call to setRemoteDescription, which MUST have been called prior to | call to setRemoteDescription, which MUST have been called prior to | |||
calling createAnswer. Like createOffer, the returned blob contains | calling createAnswer. Like createOffer, the returned blob contains | |||
descriptions of the local MediaStreams attached to this | descriptions of the media added to this PeerConnection, the | |||
PeerConnection, the codec/RTP/RTCP options negotiated for this | codec/RTP/RTCP options negotiated for this session, and any | |||
session, and any candidates that have been gathered by the ICE Agent. | candidates that have been gathered by the ICE Agent. An options | |||
An options parameter may be supplied to provide additional control | parameter may be supplied to provide additional control over the | |||
over the generated answer. | generated answer. | |||
As an answer, the generated SDP will contain a specific configuration | As an answer, the generated SDP will contain a specific configuration | |||
that specifies how the media plane should be established; for each | that specifies how the media plane should be established; for each | |||
SDP line, the generation of the SDP must follow the process defined | SDP line, the generation of the SDP must follow the process defined | |||
for generating an answer from the document that specifies the given | for generating an answer from the document that specifies the given | |||
SDP line. The exact handling of answer generation is detailed in | SDP line. The exact handling of answer generation is detailed in | |||
Section 5.3. below. | Section 5.3. below. | |||
Session descriptions generated by createAnswer must be immediately | Session descriptions generated by createAnswer must be immediately | |||
usable by setLocalDescription; like createOffer, the returned | usable by setLocalDescription; like createOffer, the returned | |||
skipping to change at page 24, line 7 ¶ | skipping to change at page 24, line 37 ¶ | |||
the state machine to the stable state, and setting the pending local | the state machine to the stable state, and setting the pending local | |||
and/or remote description back to null. Any resources or candidates | and/or remote description back to null. Any resources or candidates | |||
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 | ||||
with m= sections by the application of the rolled-back session | ||||
description (see Section 5.8 and Section 5.7). This means that some | ||||
RtpTransceivers that were previously associated will no longer be | ||||
associated with any m= section; in such cases, the value of the | ||||
RtpTransceiver's mid attribute MUST be set to null. RtpTransceivers | ||||
that were created by applying a remote offer that was subsequently | ||||
rolled back MUST be removed. However, a RtpTransceiver MUST NOT be | ||||
removed if the RtpTransceiver's RtpSender was activated by the | ||||
addTrack method. This is so that an application may call addTrack, | ||||
then call setRemoteDescription with an offer, then roll back that | ||||
offer, then call createOffer and have a m= section for the added | ||||
track appear in the generated offer. | ||||
A rollback is performed by supplying a session description of type | A rollback is performed by supplying a session description of type | |||
"rollback" with empty contents to either setLocalDescription or | "rollback" with empty contents to either setLocalDescription or | |||
setRemoteDescription, depending on which was most recently used (i.e. | setRemoteDescription, depending on which was most recently used (i.e. | |||
if the new offer was supplied to setLocalDescription, the rollback | if the new offer was supplied to setLocalDescription, the rollback | |||
should be done using setLocalDescription as well). | should be done using setLocalDescription as well). | |||
4.1.5. setLocalDescription | 4.1.5. setLocalDescription | |||
The setLocalDescription method instructs the PeerConnection to apply | The setLocalDescription method instructs the PeerConnection to apply | |||
the supplied session description as its local configuration. The | the supplied session description as its local configuration. The | |||
skipping to change at page 26, line 24 ¶ | skipping to change at page 27, line 21 ¶ | |||
null: No SDP has been received from the other side, so it is not | null: No SDP has been received from the other side, so it is not | |||
known if it can handle trickle. This is the initial value before | known if it can handle trickle. This is the initial value before | |||
setRemoteDescription() is called. | setRemoteDescription() is called. | |||
true: SDP has been received from the other side indicating that it | true: SDP has been received from the other side indicating that it | |||
can support trickle. | can support trickle. | |||
false: SDP has been received from the other side indicating that it | false: SDP has been received from the other side indicating that it | |||
cannot support trickle. | cannot support trickle. | |||
As described in Section 3.4.2, JSEP implementations always provide | As described in Section 3.5.2, JSEP implementations always provide | |||
candidates to the application individually, consistent with what is | candidates to the application individually, consistent with what is | |||
needed for Trickle ICE. However, applications can use the | needed for Trickle ICE. However, applications can use the | |||
canTrickleIceCandidates property to determine whether their peer can | canTrickleIceCandidates property to determine whether their peer can | |||
actually do Trickle ICE, i.e., whether it is safe to send an initial | actually do Trickle ICE, i.e., whether it is safe to send an initial | |||
offer or answer followed later by candidates as they are gathered. | offer or answer followed later by candidates as they are gathered. | |||
As "true" is the only value that definitively indicates remote | As "true" is the only value that definitively indicates remote | |||
Trickle ICE support, an application which compares | Trickle ICE support, an application which compares | |||
canTrickleIceCandidates against "true" will by default attempt Half | canTrickleIceCandidates against "true" will by default attempt Half | |||
Trickle on initial offers and Full Trickle on subsequent interactions | Trickle on initial offers and Full Trickle on subsequent interactions | |||
with a Trickle ICE-compatible agent. | with a Trickle ICE-compatible agent. | |||
skipping to change at page 26, line 46 ¶ | skipping to change at page 27, line 43 ¶ | |||
4.1.12. setConfiguration | 4.1.12. setConfiguration | |||
The setConfiguration method allows the global configuration of the | The setConfiguration method allows the global configuration of the | |||
PeerConnection, which was initially set by constructor parameters, to | PeerConnection, which was initially set by constructor parameters, to | |||
be changed during the session. The effects of this method call | be changed during the session. The effects of this method call | |||
depend on when it is invoked, and differ depending on which specific | depend on when it is invoked, and differ depending on which specific | |||
parameters are changed: | parameters are changed: | |||
o Any changes to the STUN/TURN servers to use affect the next | o Any changes to the STUN/TURN servers to use affect the next | |||
gathering phase. If an ICE gathering phase has already started or | gathering phase. If an ICE gathering phase has already started or | |||
completed, the 'needs-ice-restart' bit mentioned in Section 3.4.1 | completed, the 'needs-ice-restart' bit mentioned in Section 3.5.1 | |||
will be set. This will cause the next call to createOffer to | will be set. This will cause the next call to createOffer to | |||
generate new ICE credentials, for the purpose of forcing an ICE | generate new ICE credentials, for the purpose of forcing an ICE | |||
restart and kicking off a new gathering phase, in which the new | restart and kicking off a new gathering phase, in which the new | |||
servers will be used. If the ICE candidate pool has a nonzero | servers will be used. If the ICE candidate pool has a nonzero | |||
size, any existing candidates will be discarded, and new | size, any existing candidates will be discarded, and new | |||
candidates will be gathered from the new servers. | candidates will be gathered from the new servers. | |||
o Any change to the ICE candidate policy affects the next gathering | o Any change to the ICE candidate policy affects the next gathering | |||
phase. If an ICE gathering phase has already started or | phase. If an ICE gathering phase has already started or | |||
completed, the 'needs-ice-restart' bit will be set. Either way, | completed, the 'needs-ice-restart' bit will be set. Either way, | |||
skipping to change at page 27, line 31 ¶ | skipping to change at page 28, line 28 ¶ | |||
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.13. addIceCandidate | 4.1.13. 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. Connectivity checks will be sent to the new candidate. | Trickle ICE. Connectivity checks will be sent to the new candidate. | |||
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 | ||||
for all media descriptions in the last 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. | |||
5.1. Requirements Overview | 5.1. Requirements Overview | |||
skipping to change at page 31, line 43 ¶ | skipping to change at page 32, line 47 ¶ | |||
and MUST NOT be included. | and MUST NOT be included. | |||
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, for each MediaStreamTrack that has been added to the | Section 5.14. An m= section is generated for each RtpTransceiver | |||
PeerConnection via the addStream method. (Note that this method | that has been added to the PeerConnection via the addTrack, | |||
takes a MediaStream, which can contain multiple MediaStreamTracks, | addTransceiver, and setRemoteDescription methods. [[OPEN ISSUE: move | |||
and therefore multiple m= sections can be generated even if addStream | discussion of setRemoteDescription to the subsequent-offer section.]] | |||
is only called once.) m=sections MUST be sorted first by the order in | This is done in the order that their associated RtpTransceivers were | |||
which the MediaStreams were added to the PeerConnection, and then by | added to the PeerConnection and excludes RtpTranscievers that are | |||
the alphabetical ordering of the media type for the MediaStreamTrack. | stopped and not associated with an m= section (either due to an m= | |||
For example, if a MediaStream containing both an audio and a video | section being recycled or an RtpTransceiver having been stopped | |||
MediaStreamTrack is added to a PeerConnection, the resultant m=audio | before being associated with an m= section) . | |||
section will precede the m=video section. If a second MediaStream | ||||
containing an audio MediaStreamTrack was added, it would follow the | ||||
m=video 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 the certificate for the identity | |||
that has been specified for the PeerConnection; as a result, they | that has been specified for the PeerConnection; as a result, they | |||
MUST all have the same [RFC4572] fingerprint value, or this value | MUST all have the same [RFC4572] fingerprint value, or this value | |||
MUST be a session-level attribute. | MUST be a session-level attribute. | |||
skipping to change at page 32, line 49 ¶ | skipping to change at page 33, line 50 ¶ | |||
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 An "a=msid" line, as specified in [I-D.ietf-mmusic-msid], | o A direction attribute for the associated RtpTransceiver as | |||
Section 2. | described by Section 5.2.4. | |||
o An "a=sendrecv" line, as specified in [RFC3264], Section 5.1. | ||||
o For each supported codec, "a=rtpmap" and "a=fmtp" lines, as | o For each supported codec, "a=rtpmap" and "a=fmtp" lines, as | |||
specified in [RFC4566], Section 6. The audio and video codecs | specified in [RFC4566], Section 6. The audio and video codecs | |||
that MUST be supported are specified in [I-D.ietf-rtcweb-audio] | that MUST be supported are specified in [I-D.ietf-rtcweb-audio] | |||
(see Section 3) and [I-D.ietf-rtcweb-video] (see Section 5). | (see Section 3) and [I-D.ietf-rtcweb-video] (see Section 5). | |||
o If this m= section is for media with configurable frame sizes, | o If this m= section is for media with configurable frame sizes, | |||
e.g. audio, an "a=maxptime" line, indicating the smallest of the | e.g. audio, an "a=maxptime" line, indicating the smallest of the | |||
maximum supported frame sizes out of all codecs included above, as | maximum supported frame sizes out of all codecs included above, as | |||
specified in [RFC4566], Section 6. | specified in [RFC4566], Section 6. | |||
o If this m= section is for video media, and there are known | o If this m= section is for video media, and there are known | |||
limitations on the size of images which can be decoded, an | limitations on the size of images which can be decoded, an | |||
"a=imageattr" line, as specified in Section 3.5. | "a=imageattr" line, as specified in Section 3.6. | |||
o For each primary codec where RTP retransmission should be used, a | o For each primary codec where RTP retransmission should be used, a | |||
corresponding "a=rtpmap" line indicating "rtx" with the clock rate | corresponding "a=rtpmap" line indicating "rtx" with the clock rate | |||
of the primary codec and an "a=fmtp" line that references the | of the primary codec and an "a=fmtp" line that references the | |||
payload type of the primary codec, as specified in [RFC4588], | payload type of the primary codec, as specified in [RFC4588], | |||
Section 8.1. | Section 8.1. | |||
o For each supported FEC mechanism, "a=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], | |||
skipping to change at page 34, line 34 ¶ | skipping to change at page 35, line 32 ¶ | |||
with the FEC SSRC, and an "a=ssrc-group" line with semantics set | with the FEC SSRC, and an "a=ssrc-group" line with semantics set | |||
to "FEC-FR" and including the primary and FEC SSRCs, as specified | to "FEC-FR" and including the primary and FEC SSRCs, as specified | |||
in [RFC5956], section 4.3. For simplicity, if both RTX and FEC | in [RFC5956], section 4.3. For simplicity, if both RTX and FEC | |||
are supported, the FEC SSRC MUST be the same as the RTX SSRC. | are supported, the FEC SSRC MUST be the same as the RTX SSRC. | |||
o If the bundle policy for this PeerConnection is set to "max- | o If the bundle policy for this PeerConnection is set to "max- | |||
bundle", and this is not the first m= section, or the bundle | bundle", and this is not the first m= section, or the bundle | |||
policy is set to "balanced", and this is not the first m= section | policy is set to "balanced", and this is not the first m= section | |||
for this media type, an "a=bundle-only" line. | for this media type, an "a=bundle-only" line. | |||
o If the RtpSender of the RtpTransceiver associated with this | ||||
m=section is active: | ||||
* An "a=msid" line, as specified in [I-D.ietf-mmusic-msid], | ||||
Section 2. | ||||
* An "a=ssrc" line, as specified in [RFC5576], Section 4.1, | ||||
indicating the SSRC to be used for sending media, along with | ||||
the mandatory "cname" source attribute, as specified in | ||||
Section 6.1, indicating the CNAME for the source. The CNAME | ||||
MUST be generated in accordance with Section 4.9 of | ||||
[I-D.ietf-rtcweb-rtp-usage]. | ||||
* If RTX is supported for this media type, another "a=ssrc" line | ||||
with the RTX SSRC, and an "a=ssrc-group" line, as specified in | ||||
[RFC5576], section 4.2, with semantics set to "FID" and | ||||
including the primary and RTX SSRCs. | ||||
* If FEC is supported for this media type, another "a=ssrc" line | ||||
with the FEC SSRC, and an "a=ssrc-group" line with semantics | ||||
set to "FEC-FR" and including the primary and FEC SSRCs, as | ||||
specified in [RFC5956], section 4.3. For simplicity, if both | ||||
RTX and FEC are supported, the FEC SSRC MUST be the same as the | ||||
RTX SSRC. | ||||
o If the RtpTransceiver's RtpSender is active, and the application | ||||
has specified RID values or has specified more than one encoding | ||||
in the RtpSenders's parameters, an "a=rid" line for each encoding | ||||
specified. The "a=rid" line is specified in | ||||
[I-D.ietf-mmusic-rid], and its direction MUST be "send". If the | ||||
application has chosen a RID value, it MUST be used as the rid- | ||||
identifier; otherwise a RID value MUST be generated by the | ||||
implementation. When generating RID values, it is RECOMMENDED | ||||
that the values be 3 bytes or less, to allow them to efficiently | ||||
fit into the RTP header extension defined in | ||||
[I-D.ietf-avtext-rid], Section 11. If no encodings have been | ||||
specified, or only one encoding is specified but without a RID | ||||
value, then no "a=rid" lines are generated. | ||||
o If the RtpTransceiver's RtpSender is active and more than one | ||||
"a=rid" line has been generated, an "a=simulcast" line, with | ||||
direction "send", as defined in [I-D.ietf-mmusic-sdp-simulcast], | ||||
Section 6.2. The list of RIDs MUST include all of the RID | ||||
identifiers used in the "a=rid" lines for this m= section. | ||||
Lastly, if a data channel has been created, a m= section MUST be | Lastly, if a data channel has been created, a m= section MUST be | |||
generated for data. The <media> field MUST be set to "application" | generated for data. The <media> field MUST be set to "application" | |||
and the <proto> field MUST be set to "UDP/DTLS/SCTP" if the default | and the <proto> field MUST be set to "UDP/DTLS/SCTP" if the default | |||
candidate uses UDP transport, or "TCP/DTLS/SCTP" if the default | candidate uses UDP transport, or "TCP/DTLS/SCTP" if the default | |||
candidate uses TCP transport [I-D.ietf-mmusic-sctp-sdp]. The "fmt" | candidate uses TCP transport [I-D.ietf-mmusic-sctp-sdp]. The "fmt" | |||
value MUST be set to "webrtc-datachannel" as specified in | value MUST be set to "webrtc-datachannel" as specified in | |||
[I-D.ietf-mmusic-sctp-sdp], Section 4.1. | [I-D.ietf-mmusic-sctp-sdp], Section 4.1. | |||
Within the data m= section, the "a=mid", "a=ice-ufrag", "a=ice-pwd", | Within the data m= section, the "a=mid", "a=ice-ufrag", "a=ice-pwd", | |||
"a=fingerprint", and "a=setup" lines MUST be included as mentioned | "a=fingerprint", and "a=setup" lines MUST be included as mentioned | |||
skipping to change at page 35, line 8 ¶ | skipping to change at page 36, line 50 ¶ | |||
[I-D.ietf-mmusic-sctp-sdp], Section 4.1. | [I-D.ietf-mmusic-sctp-sdp], Section 4.1. | |||
Once all m= sections have been generated, a session-level "a=group" | Once all m= sections have been generated, a session-level "a=group" | |||
attribute MUST be added as specified in [RFC5888]. This attribute | attribute MUST be added as specified in [RFC5888]. This attribute | |||
MUST have semantics "bundle", and MUST include the mid identifiers of | MUST have semantics "bundle", and MUST include the mid identifiers of | |||
each m= section. The effect of this is that the browser offers all | each m= section. The effect of this is that the browser offers all | |||
m= sections as one bundle group. However, whether the m= sections | m= sections as one bundle group. However, whether the m= sections | |||
are bundle-only or not depends on the bundle policy. | are bundle-only or not depends on the bundle policy. | |||
The next step is to generate session-level lip sync groups as defined | The next step is to generate session-level lip sync groups as defined | |||
in [RFC5888], Section 7. For each MediaStream with more than one | in [RFC5888], Section 7. For each MediaStream referenced by more | |||
MediaStreamTrack, a group of type "LS" MUST be added that contains | than one RtpTransceiver (by passing those MediaStreams as arguments | |||
the mid values for each MediaStreamTrack in that MediaStream. | to the addTrack and addTransceiver methods), a group of type "LS" | |||
MUST be added that contains the mid values for each RtpTransceiver. | ||||
Attributes which SDP permits to either be at the session level or the | Attributes which SDP permits to either be at the session level or the | |||
media level SHOULD generally be at the media level even if they are | media level SHOULD generally be at the media level even if they are | |||
identical. This promotes readability, especially if one of a set of | identical. This promotes readability, especially if one of a set of | |||
initially identical attributes is subsequently changed. | initially identical attributes is subsequently changed. | |||
Attributes other than the ones specified above MAY be included, | Attributes other than the ones specified above MAY be included, | |||
except for the following attributes which are specifically | except for the following attributes which are specifically | |||
incompatible with the requirements of [I-D.ietf-rtcweb-rtp-usage], | incompatible with the requirements of [I-D.ietf-rtcweb-rtp-usage], | |||
and MUST NOT be included: | and MUST NOT be included: | |||
skipping to change at page 36, line 13 ¶ | skipping to change at page 38, line 9 ¶ | |||
candidates. | candidates. | |||
If the initial offer was applied using setLocalDescription, but an | If the initial offer was applied using setLocalDescription, but an | |||
answer from the remote side has not yet been applied, meaning the | answer from the remote side has not yet been applied, meaning the | |||
PeerConnection is still in the "local-offer" state, an offer is | PeerConnection is still in the "local-offer" state, an offer is | |||
generated by following the steps in the "stable" state above, along | generated by following the steps in the "stable" state above, along | |||
with these exceptions: | with these exceptions: | |||
o The "s=" and "t=" lines MUST stay the same. | o The "s=" and "t=" lines MUST stay the same. | |||
o If any RtpTransceiver has been added, and there exists an m= | ||||
section with a zero port in the current local description or the | ||||
current remote description, that m= section MUST be recycled by | ||||
generating an m= section for the added RtpTransceiver as if the m= | ||||
section were being added to the session description, placed at the | ||||
same index as the m= section with a zero port. | ||||
o If an RtpTransceiver is stopped and is not associated with an m= | ||||
section, an m= section MUST NOT be generated for it. This | ||||
prevents adding back RtpTransceivers whose m= sections were | ||||
recycled and used for a new RtpTransceiver in a previous offer/ | ||||
answer exchange, as described above. | ||||
o If an RtpTransceiver has been stopped and is associated with an m= | ||||
section, and the m= section is not being recycled as described | ||||
above, an m= section MUST be generated for it with the port set to | ||||
zero and the "a=msid", "a=ssrc", and "a=ssrc-group" lines removed. | ||||
o For RtpTransceivers that are not stopped, the "a=msid", "a=ssrc", | ||||
and "a=ssrc-group" lines MUST stay the same if they are present in | ||||
the current description. | ||||
o Each "m=" and c=" line MUST be filled in with the port, protocol, | o Each "m=" and c=" line MUST be filled in with the port, protocol, | |||
and address of the default candidate for the m= section, as | and address of the default candidate for the m= section, as | |||
described in [RFC5245], Section 4.3. If ICE checking has already | described in [RFC5245], Section 4.3. If ICE checking has already | |||
completed for one or more candidate pairs and a candidate pair is | completed for one or more candidate pairs and a candidate pair is | |||
in active use, then that pair MUST be used, even if ICE has not | in active use, then that pair MUST be used, even if ICE has not | |||
yet completed. Note that this differs from the guidance in | yet completed. Note that this differs from the guidance in | |||
[RFC5245], Section 9.1.2.2, which only refers to offers created | [RFC5245], Section 9.1.2.2, which only refers to offers created | |||
when ICE has completed. Each "a=rtcp" attribute line MUST also be | when ICE has completed. Each "a=rtcp" attribute line MUST also be | |||
filled in with the port and address of the appropriate default | filled in with the port and address of the appropriate default | |||
candidate, either the default RTP or RTCP candidate, depending on | candidate, either the default RTP or RTCP candidate, depending on | |||
skipping to change at page 36, line 35 ¶ | skipping to change at page 39, line 5 ¶ | |||
default RTCP candidate MUST be used, as indicated in [RFC5761], | default RTCP candidate MUST be used, as indicated in [RFC5761], | |||
section 5.1.3. In each case, if no candidates of the desired type | section 5.1.3. In each case, if no candidates of the desired type | |||
have yet been gathered, dummy values MUST be used, as described | have yet been gathered, dummy values MUST be used, as described | |||
above. | above. | |||
o Each "a=mid" line MUST stay the same. | o Each "a=mid" line MUST stay the same. | |||
o Each "a=ice-ufrag" and "a=ice-pwd" line MUST stay the same, unless | o Each "a=ice-ufrag" and "a=ice-pwd" line MUST stay the same, unless | |||
the ICE configuration has changed (either changes to the supported | the ICE configuration has changed (either changes to the supported | |||
STUN/TURN servers, or the ICE candidate policy), or the | STUN/TURN servers, or the ICE candidate policy), or the | |||
"IceRestart" option (Section 5.2.3.3 was specified. If the m= | "IceRestart" option (Section 5.2.3.1 was specified. If the m= | |||
section is bundled into another m= section, it still MUST NOT | section is bundled into another m= section, it still MUST NOT | |||
contain any ICE credentials. | contain any ICE credentials. | |||
o If the m= section is not bundled into another m= section, for each | o If the m= section is not bundled into another m= section, for each | |||
candidate that has been gathered during the most recent gathering | candidate that has been gathered during the most recent gathering | |||
phase (see Section 3.4.1), an "a=candidate" line MUST be added, as | phase (see Section 3.5.1), an "a=candidate" line MUST be added, as | |||
defined in [RFC5245], Section 4.3., paragraph 3. If candidate | defined in [RFC5245], Section 4.3., paragraph 3. If candidate | |||
gathering for the section has completed, an "a=end-of-candidates" | gathering for the section has completed, an "a=end-of-candidates" | |||
attribute MUST be added, as described in [I-D.ietf-ice-trickle], | attribute MUST be added, as described in [I-D.ietf-ice-trickle], | |||
Section 9.3. If the m= section is bundled into another m= | Section 9.3. If the m= section is bundled into another m= | |||
section, both "a=candidate" and "a=end-of-candidates" MUST be | section, both "a=candidate" and "a=end-of-candidates" MUST be | |||
omitted. | omitted. | |||
o For MediaStreamTracks that are still present, the "a=msid", | o For RtpTransceivers that are still present, the "a=msid", | |||
"a=ssrc", and "a=ssrc-group" lines MUST stay the same. | "a=ssrc", and "a=ssrc-group" lines MUST stay the same. | |||
o If any MediaStreamTracks have been removed, either through the | o For RtpTransceivers that are still present, the "a=rid" lines MUST | |||
removeStream method or by removing them from an added MediaStream, | stay the same. | |||
their m= sections MUST be marked as recvonly by changing the value | ||||
of the [RFC3264] directional attribute to "a=recvonly". The | ||||
"a=msid", "a=ssrc", and "a=ssrc-group" lines MUST be removed from | ||||
the associated m= sections. | ||||
o If any MediaStreamTracks have been added, and there exist m= | o For RtpTransceivers that are still present, any "a=simulcast" line | |||
sections of the appropriate media type with no associated | MUST stay the same. | |||
MediaStreamTracks (i.e. as described in the preceding paragraph), | ||||
those m= sections MUST be recycled by adding the new | o If any RtpTransceiver has been stopped, the port MUST be set to | |||
MediaStreamTrack to the m= section. This is done by adding the | zero and the "a=msid", "a=ssrc", and "a=ssrc-group" lines MUST be | |||
necessary "a=msid", "a=ssrc", and "a=ssrc-group" lines to the | removed. | |||
recycled m= section, and removing the "a=recvonly" attribute. | ||||
o If any RtpTransceiver has been added, and there exists a m= | ||||
section with a zero port in the current local description or the | ||||
current remote description, that m= section MUST be recycled by | ||||
generating a m= section for the added RtpTransceiver as if the m= | ||||
section were being added to session description, except that | ||||
instead of adding it, the generated m= section replaces the m= | ||||
section with a zero port. | ||||
If the initial offer was applied using setLocalDescription, and an | If the initial offer was applied using setLocalDescription, and an | |||
answer from the remote side has been applied using | answer from the remote side has been applied using | |||
setRemoteDescription, meaning the PeerConnection is in the "remote- | setRemoteDescription, meaning the PeerConnection is in the "remote- | |||
pranswer" or "stable" states, an offer is generated based on the | pranswer" or "stable" states, an offer is generated based on the | |||
negotiated session descriptions by following the steps mentioned for | negotiated session descriptions by following the steps mentioned for | |||
the "local-offer" state above, along with these exceptions: | the "local-offer" state above. | |||
o If a m= section exists in the current local description, but does | ||||
not have an associated local MediaStreamTrack (possibly because | ||||
said MediaStreamTrack was removed since the last exchange), a m= | ||||
section MUST still be generated in the new offer, as indicated in | ||||
[RFC3264], Section 8. The disposition of this section will depend | ||||
on the state of the remote MediaStreamTrack associated with this | ||||
m= section. If one exists, and it is still in the "live" state, | ||||
the new m= section MUST be marked as "a=recvonly", with no | ||||
"a=msid" or related attributes present. If no remote | ||||
MediaStreamTrack exists, or it is in the "ended" state, the m= | ||||
section MUST be marked as rejected, by setting the port to zero, | ||||
as indicated in [RFC3264], Section 8.2. | ||||
o If any MediaStreamTracks have been added, and there exist recvonly | ||||
m= sections of the appropriate media type with no associated | ||||
MediaStreamTracks, or rejected m= sections of any media type, | ||||
those m= sections MUST be recycled, and a local MediaStreamTrack | ||||
associated with these recycled m= sections until all such existing | ||||
m= sections have been used. This includes any recvonly or | ||||
rejected m= sections created by the preceding paragraph. | ||||
In addition, for each non-recycled, non-rejected m= section in the | In addition, for each non-recycled, non-rejected m= section in the | |||
new offer, the following adjustments are made based on the contents | new offer, the following adjustments are made based on the contents | |||
of the corresponding m= section in the current remote description: | of the corresponding m= section in the current remote description: | |||
o The m= line and corresponding "a=rtpmap" and "a=fmtp" lines MUST | o The m= line and corresponding "a=rtpmap" and "a=fmtp" lines MUST | |||
only include codecs present in the remote description. | only include codecs present in the remote description. | |||
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 remote description. | in the remote description. | |||
skipping to change at page 38, line 35 ¶ | skipping to change at page 40, line 35 ¶ | |||
are still alive, as well as any new m= sections. | are still alive, as well as any new m= sections. | |||
The "LS" groups are generated in the same way as with initial offers. | The "LS" groups are generated in the same way as with initial offers. | |||
5.2.3. Options Handling | 5.2.3. Options Handling | |||
The createOffer method takes as a parameter an RTCOfferOptions | The createOffer method takes as a parameter an RTCOfferOptions | |||
object. Special processing is performed when generating a SDP | object. Special processing is performed when generating a SDP | |||
description if the following options are present. | description if the following options are present. | |||
5.2.3.1. OfferToReceiveAudio | 5.2.3.1. IceRestart | |||
If the "OfferToReceiveAudio" option is specified, with an integer | ||||
value of N, and M audio MediaStreamTracks have been added to the | ||||
PeerConnection, the offer MUST include N non-rejected m= sections | ||||
with media type "audio", even if N is greater than M. This allows | ||||
the offerer to receive audio, including multiple independent streams, | ||||
even when not sending it; accordingly, the directional attribute on | ||||
the N-M audio m= sections without associated MediaStreamTracks MUST | ||||
be set to recvonly. | ||||
If N is set to a value less than M, the offer MUST mark the m= | ||||
sections associated with the M-N most recently added (since the last | ||||
setLocalDescription) MediaStreamTracks as sendonly. This allows the | ||||
offerer to indicate that it does not want to receive audio on some or | ||||
all of its newly created streams. For m= sections that have | ||||
previously been negotiated, this setting has no effect. [TODO: refer | ||||
to RTCRtpSender in the future] | ||||
For backwards compatibility with pre-standard versions of this | ||||
specification, a value of "true" is interpreted as equivalent to N=1, | ||||
and "false" as N=0. | ||||
5.2.3.2. OfferToReceiveVideo | ||||
If the "OfferToReceiveVideo" option is specified, with an integer | ||||
value of N, and M video MediaStreamTracks have been added to the | ||||
PeerConnection, the offer MUST include N non-rejected m= sections | ||||
with media type "video", even if N is greater than M. This allows | ||||
the offerer to receive video, including multiple independent streams, | ||||
even when not sending it; accordingly, the directional attribute on | ||||
the N-M video m= sections without associated MediaStreamTracks MUST | ||||
be set to recvonly. | ||||
If N is set to a value less than M, the offer MUST mark the m= | ||||
sections associated with the M-N most recently added (since the last | ||||
setLocalDescription) MediaStreamTracks as sendonly. This allows the | ||||
offerer to indicate that it does not want to receive video on some or | ||||
all of its newly created streams. For m= sections that have | ||||
previously been negotiated, this setting has no effect. [TODO: refer | ||||
to RTCRtpSender in the future] | ||||
For backwards compatibility with pre-standard versions of this | ||||
specification, a value of "true" is interpreted as equivalent to N=1, | ||||
and "false" as N=0. | ||||
5.2.3.3. IceRestart | ||||
If the "IceRestart" option is specified, with a value of "true", the | If the "IceRestart" option is specified, with a value of "true", the | |||
offer MUST indicate an ICE restart by generating new ICE ufrag and | offer MUST indicate an ICE restart by generating new ICE ufrag and | |||
pwd attributes, as specified in [RFC5245], Section 9.1.1.1. If this | pwd attributes, as specified in [RFC5245], Section 9.1.1.1. If this | |||
option is specified on an initial offer, it has no effect (since a | option is specified on an initial offer, it has no effect (since a | |||
new ICE ufrag and pwd are already generated). Similarly, if the ICE | new ICE ufrag and pwd are already generated). Similarly, if the ICE | |||
configuration has changed, this option has no effect, since new ufrag | configuration has changed, this option has no effect, since new ufrag | |||
and pwd attributes will be generated automatically. This option is | and pwd attributes will be generated automatically. This option is | |||
primarily useful for reestablishing connectivity in cases where | primarily useful for reestablishing connectivity in cases where | |||
failures are detected by the application. | failures are detected by the application. | |||
5.2.3.4. VoiceActivityDetection | 5.2.3.2. VoiceActivityDetection | |||
If the "VoiceActivityDetection" option is specified, with a value of | If the "VoiceActivityDetection" option is specified, with a value of | |||
"true", the offer MUST indicate support for silence suppression in | "true", the offer MUST indicate support for silence suppression in | |||
the audio it receives by including comfort noise ("CN") codecs for | the audio it receives by including comfort noise ("CN") codecs for | |||
each offered audio codec, as specified in [RFC3389], Section 5.1, | each offered audio codec, as specified in [RFC3389], Section 5.1, | |||
except for codecs that have their own internal silence suppression | except for codecs that have their own internal silence suppression | |||
support. For codecs that have their own internal silence suppression | support. For codecs that have their own internal silence suppression | |||
support, the appropriate fmtp parameters for that codec MUST be | support, the appropriate fmtp parameters for that codec MUST be | |||
specified to indicate that silence suppression for received audio is | specified to indicate that silence suppression for received audio is | |||
desired. For example, when using the Opus codec, the "usedtx=1" | desired. For example, when using the Opus codec, the "usedtx=1" | |||
skipping to change at page 40, line 28 ¶ | skipping to change at page 41, line 31 ¶ | |||
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 41, line 10 ¶ | skipping to change at page 42, line 28 ¶ | |||
rejected. | rejected. | |||
The first step in generating an initial answer is to generate | The first step in generating an initial answer is to generate | |||
session-level attributes. The process here is identical to that | session-level attributes. The process here is identical to that | |||
indicated in the Initial Offers section above, except that the | indicated in the Initial Offers section above, except that the | |||
"a=ice-options" line, with the "trickle" option as specified in | "a=ice-options" line, with the "trickle" option as specified in | |||
[I-D.ietf-ice-trickle], Section 4, is only included if such an option | [I-D.ietf-ice-trickle], Section 4, is only included if such an option | |||
was present in the offer. | was present in the offer. | |||
The next step is to generate lip sync groups as defined in [RFC5888], | The next step is to generate lip sync groups as defined in [RFC5888], | |||
Section 7. For each MediaStream with more than one MediaStreamTrack, | Section 7. For each MediaStream with more than one referenced | |||
a group of type "LS" MUST be added that contains the mid values for | RtpTransceiver, a group of type "LS" MUST be added that contains the | |||
each MediaStreamTrack in that MediaStream. In some cases this may | mid values for each RtpTransceiver added with that MediaStream. In | |||
result in adding a mid to a given LS group that was not in that LS | some cases this may result in adding a mid to a given LS group that | |||
group in the associated offer. Although this is not allowed by | was not in that LS group in the associated offer. Although this is | |||
[RFC5888], it is allowed when implementing this specification. | not allowed by [RFC5888], it is allowed when implementing this | |||
[[OPEN ISSUE: This is still under discussion. See: | specification. [[OPEN ISSUE: This is still under discussion. See: | |||
https://github.com/rtcweb-wg/jsep/issues/162.]] | https://github.com/rtcweb-wg/jsep/issues/162.]] | |||
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. If there is | The next step is to go through each offered m= section. Each offered | |||
a local MediaStreamTrack of the same type which has been added to the | m= section will have an associated RtpTransceiver, as described in | |||
PeerConnection via addStream and not yet associated with a m= | Section 5.8. If there are more RtpTransceivers than there are m= | |||
section, and the specific m= section is either sendrecv or recvonly, | sections, the unmatched RtpTransceivers will need to be associated in | |||
the MediaStreamTrack will be associated with the m= section at this | a subsequent offer. | |||
time. MediaStreamTracks are assigned to m= sections using the | ||||
canonical order described in Section 5.2.1. If there are more m= | ||||
sections of a certain type than MediaStreamTracks, some m= sections | ||||
will not have an associated MediaStreamTrack. If there are more | ||||
MediaStreamTracks of a certain type than compatible m= sections, only | ||||
the first N MediaStreamTracks will be able to be associated in the | ||||
constructed answer. The remainder will need to be associated in a | ||||
subsequent offer. | ||||
For each offered m= section, if the associated remote | For each offered m= section, if the associated RtpTransceiver has | |||
MediaStreamTrack has been stopped, and is therefore in state "ended", | been stopped, the corresponding m= section in the answer MUST be | |||
and no local MediaStreamTrack has been associated, the corresponding | marked as rejected by setting the port in the m= line to zero, as | |||
m= section in the answer MUST be marked as rejected by setting the | indicated in [RFC3264], Section 6., and further processing for this | |||
port in the m= line to zero, as indicated in [RFC3264], Section 6., | m= section can be skipped. | |||
and further processing for this m= section can be skipped. | ||||
Provided that is not the case, each m= section in the answer should | Provided that is not the case, each m= section in the answer should | |||
then be generated as specified in [RFC3264], Section 6.1. For the m= | then be generated as specified in [RFC3264], Section 6.1. For the m= | |||
line itself, the following rules must be followed: | line itself, the 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 | |||
have yet been gathered, the "dummy" port value of 9 (Discard) MUST | have yet been gathered, the "dummy" port value of 9 (Discard) MUST | |||
be used, as indicated in [I-D.ietf-ice-trickle], Section 5.1. | be used, as indicated in [I-D.ietf-ice-trickle], Section 5.1. | |||
skipping to change at page 42, line 28 ¶ | skipping to change at page 43, line 37 ¶ | |||
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 If a local MediaStreamTrack has been associated, an "a=msid" line, | o A direction attribute for the associated RtpTransceiver described | |||
as specified in [I-D.ietf-mmusic-msid], Section 2. | by Section 5.3.4. | |||
o Depending on the directionality of the offer, the disposition of | ||||
any associated remote MediaStreamTrack, and the presence of an | ||||
associated local MediaStreamTrack, the appropriate directionality | ||||
attribute, as specified in [RFC3264], Section 6.1. If the offer | ||||
was sendrecv, and the remote MediaStreamTrack is still "live", and | ||||
there is a local MediaStreamTrack that has been associated, the | ||||
directionality MUST be set as sendrecv. If the offer was | ||||
sendonly, and the remote MediaStreamTrack is still "live", the | ||||
directionality MUST be set as recvonly. If the offer was | ||||
recvonly, and a local MediaStreamTrack has been associated, the | ||||
directionality MUST be set as sendonly. If the offer was | ||||
inactive, the directionality MUST be set as inactive. | ||||
o For each supported codec that is present in the offer, "a=rtpmap" | o For each supported codec that is present in the offer, "a=rtpmap" | |||
and "a=fmtp" lines, as specified in [RFC4566], Section 6, and | and "a=fmtp" lines, as specified in [RFC4566], Section 6, and | |||
[RFC3264], Section 6.1. 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 | |||
specified in [RFC4566], Section 6. | specified in [RFC4566], Section 6. | |||
o If this m= section is for video media, and there are known | o If this m= section is for video media, and there are known | |||
limitations on the size of images which can be decoded, an | limitations on the size of images which can be decoded, an | |||
"a=imageattr" line, as specified in Section 3.5. | "a=imageattr" line, as specified in Section 3.6. | |||
o If "rtx" is present in the offer, for each primary codec where RTP | o If "rtx" is present in the offer, for each primary codec where RTP | |||
retransmission should be used, a corresponding "a=rtpmap" line | retransmission should be used, a corresponding "a=rtpmap" line | |||
indicating "rtx" with the clock rate of the primary codec and an | indicating "rtx" with the clock rate of the primary codec and an | |||
"a=fmtp" line that references the payload type of the primary | "a=fmtp" line that references the payload type of the primary | |||
codec, as specified in [RFC4588], Section 8.1. | codec, as specified in [RFC4588], Section 8.1. | |||
o For each supported FEC mechanism, "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], | |||
skipping to change at page 44, line 11 ¶ | skipping to change at page 45, line 7 ¶ | |||
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. | |||
o For each supported RTCP feedback mechanism that is present in the | o For each supported RTCP feedback mechanism that is present in the | |||
offer, an "a=rtcp-fb" mechanism, as specified in [RFC4585], | offer, an "a=rtcp-fb" mechanism, as specified in [RFC4585], | |||
Section 4.2. The list of RTCP feedback mechanisms that SHOULD/ | Section 4.2. The list of RTCP feedback mechanisms that SHOULD/ | |||
MUST be supported is specified in [I-D.ietf-rtcweb-rtp-usage], | MUST be supported is specified in [I-D.ietf-rtcweb-rtp-usage], | |||
Section 5.1. | Section 5.1. | |||
o If a local MediaStreamTrack has been associated, an "a=ssrc" line, | o If the RtpSender of the RtpTransceiver associated with this | |||
as specified in [RFC5576], Section 4.1, indicating the SSRC to be | m=section is active: | |||
used for sending media, along with the mandatory "cname" source | ||||
attribute, as specified in Section 6.1, indicating the CNAME for | ||||
the source. The CNAME MUST be generated in accordance with | ||||
Section 4.9 of [I-D.ietf-rtcweb-rtp-usage]. | ||||
o If a local MediaStreamTrack has been associated, and RTX has been | * An "a=msid" line, as specified in [I-D.ietf-mmusic-msid], | |||
negotiated for this m= section, another "a=ssrc" line with the RTX | Section 2. | |||
SSRC, and an "a=ssrc-group" line, as specified in [RFC5576], | ||||
section 4.2, with semantics set to "FID" and including the primary | ||||
and RTX SSRCs. | ||||
o If a local MediaStreamTrack has been associated, and FEC has been | * An "a=ssrc" line, as specified in [RFC5576], Section 4.1, | |||
negotiated for this m= section, another "a=ssrc" line with the FEC | indicating the SSRC to be used for sending media, along with | |||
SSRC, and an "a=ssrc-group" line with semantics set to "FEC-FR" | the mandatory "cname" source attribute, as specified in | |||
and including the primary and FEC SSRCs, as specified in | Section 6.1, indicating the CNAME for the source. The CNAME | |||
[RFC5956], section 4.3. For simplicity, if both RTX and FEC are | MUST be generated in accordance with Section 4.9 of | |||
supported, the FEC SSRC MUST be the same as the RTX SSRC. | [I-D.ietf-rtcweb-rtp-usage]. | |||
* If RTX has been negotiated for this m= section, another | ||||
"a=ssrc" line with the RTX SSRC, and an "a=ssrc-group" line, as | ||||
specified in [RFC5576], section 4.2, with semantics set to | ||||
"FID" and including the primary and RTX SSRCs. | ||||
* If FEC has been negotiated for this m= section, another | ||||
"a=ssrc" line with the FEC SSRC, and an "a=ssrc-group" line | ||||
with semantics set to "FEC-FR" and including the primary and | ||||
FEC SSRCs, as specified in [RFC5956], section 4.3. For | ||||
simplicity, if both RTX and FEC are supported, the FEC SSRC | ||||
MUST be the same as the RTX SSRC. | ||||
If a data channel m= section has been offered, a m= section MUST also | If a data channel m= section has been offered, a m= section MUST also | |||
be generated for data. The <media> field MUST be set to | be generated for data. The <media> field MUST be set to | |||
"application" and the <proto> and "fmt" fields MUST be set to exactly | "application" and the <proto> and "fmt" fields MUST be set to exactly | |||
match the fields in the offer. | match the fields in the offer. | |||
Within the data m= section, the "a=mid", "a=ice-ufrag", "a=ice-pwd", | Within the data m= section, the "a=mid", "a=ice-ufrag", "a=ice-pwd", | |||
"a=candidate", "a=fingerprint", and "a=setup" lines MUST be included | "a=candidate", "a=fingerprint", and "a=setup" lines MUST be included | |||
as mentioned above, along with an "a=fmtp:webrtc-datachannel" line | as mentioned above, along with an "a=fmtp:webrtc-datachannel" line | |||
and an "a=sctp-port" line referencing the SCTP port number as defined | and an "a=sctp-port" line referencing the SCTP port number as defined | |||
skipping to change at page 45, line 51 ¶ | skipping to change at page 47, line 7 ¶ | |||
above. | above. | |||
o Each "a=ice-ufrag" and "a=ice-pwd" line MUST stay the same, unless | o Each "a=ice-ufrag" and "a=ice-pwd" line MUST stay the same, unless | |||
the m= section is restarting, in which case new ICE credentials | the m= section is restarting, in which case new ICE credentials | |||
must be created as specified in [RFC5245], Section 9.2.1.1. If | must be created as specified in [RFC5245], Section 9.2.1.1. If | |||
the m= section is bundled into another m= section, it still MUST | the m= section is bundled into another m= section, it still MUST | |||
NOT contain any ICE credentials. | NOT contain any ICE credentials. | |||
o If the m= section is not bundled into another m= section, for each | o If the m= section is not bundled into another m= section, for each | |||
candidate that has been gathered during the most recent gathering | candidate that has been gathered during the most recent gathering | |||
phase (see Section 3.4.1), an "a=candidate" line MUST be added, as | phase (see Section 3.5.1), an "a=candidate" line MUST be added, as | |||
defined in [RFC5245], Section 4.3., paragraph 3. If candidate | defined in [RFC5245], Section 4.3., paragraph 3. If candidate | |||
gathering for the section has completed, an "a=end-of-candidates" | gathering for the section has completed, an "a=end-of-candidates" | |||
attribute MUST be added, as described in [I-D.ietf-ice-trickle], | attribute MUST be added, as described in [I-D.ietf-ice-trickle], | |||
Section 9.3. If the m= section is bundled into another m= | Section 9.3. If the m= section is bundled into another m= | |||
section, both "a=candidate" and "a=end-of-candidates" MUST be | section, both "a=candidate" and "a=end-of-candidates" MUST be | |||
omitted. | omitted. | |||
o For MediaStreamTracks that are still present, the "a=msid", | o For RtpTransceivers that are not stopped, the "a=msid", "a=ssrc", | |||
"a=ssrc", and "a=ssrc-group" lines MUST stay the same. | and "a=ssrc-group" lines MUST stay the same. | |||
5.3.3. Options Handling | 5.3.3. Options Handling | |||
The createAnswer method takes as a parameter an RTCAnswerOptions | The createAnswer method takes as a parameter an RTCAnswerOptions | |||
object. The set of parameters for RTCAnswerOptions is different than | object. The set of parameters for RTCAnswerOptions is different than | |||
those supported in RTCOfferOptions; the OfferToReceiveAudio, | those supported in RTCOfferOptions; the IceRestart option is | |||
OfferToReceiveVideo, and IceRestart options mentioned in | unnecessary, as ICE credentials will automatically be changed for all | |||
Section 5.2.3 are meaningless in the context of generating an answer, | m= lines where the offerer chose to perform ICE restart. | |||
as there is no need to generate extra m= lines in an answer, and ICE | ||||
credentials will automatically be changed for all m= lines where the | ||||
offerer chose to perform ICE restart. | ||||
The following options are supported in RTCAnswerOptions. | The following options are supported in RTCAnswerOptions. | |||
5.3.3.1. VoiceActivityDetection | 5.3.3.1. VoiceActivityDetection | |||
Silence suppression in the answer is handled as described in | Silence suppression in the answer is handled as described in | |||
Section 5.2.3.4, 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 | ||||
[RFC3264] direction attributes (defined in Section 6.1) in answers | ||||
are chosen according to the direction attribute in the remote offer | ||||
and the states of the RtpSender and RtpReceiver of the corresponding | ||||
RtpTransceiver, as follows: | ||||
+-----------------+-----------+-------------+------------------+ | ||||
| offer direction | RtpSender | RtpReceiver | answer direction | | ||||
+-----------------+-----------+-------------+------------------+ | ||||
| sendrecv | active | active | sendrecv | | ||||
| sendrecv | active | inactive | sendonly | | ||||
| sendrecv | inactive | active | recvonly | | ||||
| sendrecv | inactive | inactive | inactive | | ||||
| sendonly | * | active | recvonly | | ||||
| sendonly | * | inactive | inactive | | ||||
| recvonly | active | * | sendonly | | ||||
| recvonly | inactive | * | inactive | | ||||
| inactive | * | * | inactive | | ||||
+-----------------+-----------+-------------+------------------+ | ||||
5.4. Processing a Local Description | 5.4. 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". | |||
skipping to change at page 52, line 25 ¶ | skipping to change at page 54, line 18 ¶ | |||
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. | |||
o If present, a single "a=end-of-candidates" attribute MUST be | o If present, a single "a=end-of-candidates" attribute MUST be | |||
parsed as specified in [I-D.ietf-ice-trickle], Section 8.2, and | parsed as specified in [I-D.ietf-ice-trickle], Section 8.2, and | |||
its presence or absence flagged and stored. | its presence or absence flagged and stored. | |||
o Any "a=imageattr" attributes MUST be parsed as specified in | o Any "a=imageattr" attributes MUST be parsed as specified in | |||
[RFC6236], Section 3, and their values stored. | [RFC6236], Section 3, and their values stored. | |||
o Any "a=rid" lines MUST be parsed as specified in | ||||
[I-D.ietf-mmusic-rid], Section 10, and their values stored. | ||||
o If present, a single "a=simulcast" line MUST be parsed as | ||||
specified in [I-D.ietf-mmusic-sdp-simulcast], and its values | ||||
stored. | ||||
Otherwise, if the "m=" proto value indicates use of SCTP, the | Otherwise, if the "m=" proto value indicates use of SCTP, the | |||
following attribute lines MUST be processed: | following attribute lines MUST be processed: | |||
o The "m=" fmt value MUST be parsed as specified in | o The "m=" fmt value MUST be parsed as specified in | |||
[I-D.ietf-mmusic-sctp-sdp], Section 4.3, and the application | [I-D.ietf-mmusic-sctp-sdp], Section 4.3, and the application | |||
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. | |||
skipping to change at page 53, line 16 ¶ | skipping to change at page 55, line 16 ¶ | |||
limits specified in [RFC5245], Section 15.4. | limits specified in [RFC5245], Section 15.4. | |||
* DTLS setup value, which MUST be set according to the rules | * DTLS setup value, which MUST be set according to the rules | |||
specified in [RFC5763], Section 5, and MUST be consistent with | specified in [RFC5763], Section 5, and MUST be consistent with | |||
the selected role of the current DTLS connection, if one | the selected role of the current DTLS connection, if one | |||
exists.[TODO: may need revision, i.e., use of actpass | exists.[TODO: may need revision, i.e., use of actpass | |||
* DTLS fingerprint values, where at least one fingerprint MUST be | * DTLS fingerprint values, where at least one fingerprint MUST be | |||
present. | present. | |||
o All RID values referenced in an "a=simulcast" line MUST exist as | ||||
"a=rid" lines. | ||||
o Each m= section is also checked to ensure prohibited features are | o Each m= section is also checked to ensure prohibited features are | |||
not used. If this is a local description, the "ice-lite" | not used. If this is a local description, the "ice-lite" | |||
attribute MUST NOT be specified. | attribute MUST NOT be specified. | |||
If this session description is of type "pranswer" or "answer", the | If this session description is of type "pranswer" or "answer", the | |||
following additional checks are applied: | following additional checks are applied: | |||
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 | |||
skipping to change at page 54, line 9 ¶ | skipping to change at page 56, line 12 ¶ | |||
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, trigger the | |||
ICE Agent to start an ICE restart and begin gathering new | ICE Agent to start an ICE restart and begin gathering new | |||
candidates for the media section, as defined in [RFC5245], | candidates for the media section, as defined in [RFC5245], | |||
Section 9.1.1.1, unless it has been marked as bundle-only. | Section 9.1.1.1, unless it has been marked as bundle-only. | |||
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 | ||||
(which should only happen when applying an offer), find one and | ||||
associate it with this m= section according to the following | ||||
steps: | ||||
+ Find the RtpTransceiver that corresponds to the m= section | ||||
with the same MID in the created offer. | ||||
+ Set the value of the RtpTransceiver's mid attribute to the | ||||
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 unknown, | |||
this MUST result in an error. | this MUST result in an error. | |||
skipping to change at page 55, line 35 ¶ | skipping to change at page 57, line 48 ¶ | |||
restart is needed. | restart is needed. | |||
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- | ||||
of-candidates indication as described in [I-D.ietf-ice-trickle] | ||||
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] | * [TODO: header extensions] | |||
* If the m= section is being recycled (see Section 5.2.2), | ||||
dissociate the currently associated RtpTransceiver by setting | ||||
its mid attribute to null. | ||||
* If the m= section is not associated with any RtpTransceiver | ||||
(possibly because it was dissociated in the previous step), | ||||
either find an RtpTransceiver or create one according to the | ||||
following steps: | ||||
+ If the m= section is sendrecv or recvonly, and there are | ||||
RtpTransceivers of the same type that were added to the | ||||
PeerConnection by addTrack and are not associated with any | ||||
m= section and are not stopped, find the first (according to | ||||
the canonical order described in Section 5.2.1) such | ||||
RtpTransceiver. | ||||
+ If no RtpTransceiver was found in the previous step, create | ||||
one with an inactive RtpSender and active RtpReceiver. | ||||
+ Associate the found or created RtpTransceiver with the m= | ||||
section by setting the value of the RtpTransceiver's mid | ||||
attribute to the MID of the m= section. | ||||
* For each specified payload type that is also supported by the | * For each specified payload type that is also supported by the | |||
local implementation, establish a mapping between the payload | local implementation, establish a mapping between the payload | |||
type ID and the actual media format. [TODO - Justin to add | type ID and the actual media format. [TODO - Justin to add | |||
more to explain mapping.] If any indicated payload type is | more to explain mapping.] If any indicated payload type is | |||
unknown, it MUST be ignored. [TODO: should fail on answers] | unknown, it MUST be ignored. [TODO: should fail on answers] | |||
* 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]. If any referenced primary | |||
payload types are not present, this MUST result in an error. | payload types are not present, this MUST result in an error. | |||
skipping to change at page 57, line 29 ¶ | skipping to change at page 60, line 22 ¶ | |||
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]. | |||
* 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 specified primary SSRC and one of the selected | |||
payload types, once the underlying transport layers have been | payload types, once the underlying transport layers have been | |||
established. Otherwise, stop transmitting RTP media, although | established. If RID values are specified, include the RID | |||
RTCP should still be sent, as described in [RFC3264], | header extension in the RTP streams, as indicated in | |||
Section 5.1. | [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. | |||
skipping to change at page 58, line 19 ¶ | skipping to change at page 61, line 17 ¶ | |||
Changes MUST NOT be silently ignored. | Changes MUST NOT be silently ignored. | |||
The following elements of the session description MUST NOT be changed | The following elements of the session description MUST NOT be changed | |||
between the createOffer and the setLocalDescription (or between the | between the createOffer and the setLocalDescription (or between the | |||
createAnswer and the setLocalDescription), since they reflect | createAnswer and the setLocalDescription), since they reflect | |||
transport attributes that are solely under browser control, and the | transport attributes that are solely under browser control, and the | |||
browser MUST NOT honor an attempt to change them: | browser MUST NOT honor an attempt to change them: | |||
o The number, type and port number of m= lines. | o The number, type and port number of m= lines. | |||
o The generated MID attributes (a=mid). | ||||
o The generated ICE credentials (a=ice-ufrag and a=ice-pwd). | o The generated ICE credentials (a=ice-ufrag and a=ice-pwd). | |||
o The set of ICE candidates and their parameters (a=candidate). | o The set of ICE candidates and their parameters (a=candidate). | |||
o The DTLS fingerprint(s) (a=fingerprint). | o The DTLS fingerprint(s) (a=fingerprint). | |||
o The contents of bundle groups, bundle-only parameters, or "a=rtcp- | o The contents of bundle groups, bundle-only parameters, or "a=rtcp- | |||
mux" parameters. | mux" parameters. | |||
The following modifications, if done by the browser to a description | The following modifications, if done by the browser to a description | |||
skipping to change at page 60, line 7 ¶ | skipping to change at page 63, line 7 ¶ | |||
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 | |||
the offer or answer, so the offers and answers are complete. Trickle | the offer or answer, so the offers and answers are complete. Trickle | |||
ICE is not used. Both Alice and Bob are using the default policy of | ICE is not used. Both Alice and Bob are using the default policy of | |||
balanced. | balanced. | |||
// set up local media state | // set up local media state | |||
AliceJS->AliceUA: create new PeerConnection | AliceJS->AliceUA: create new PeerConnection | |||
AliceJS->AliceUA: addStream with stream containing audio and video | AliceJS->AliceUA: addTrack with two tracks: one for audio and one for video | |||
AliceJS->AliceUA: createOffer to get offer | AliceJS->AliceUA: createOffer to get offer | |||
AliceJS->AliceUA: setLocalDescription with offer | AliceJS->AliceUA: setLocalDescription with offer | |||
AliceUA->AliceJS: multiple onicecandidate events with candidates | AliceUA->AliceJS: multiple onicecandidate events with candidates | |||
// wait for ICE gathering to complete | // wait for ICE gathering to complete | |||
AliceUA->AliceJS: onicecandidate event with null candidate | AliceUA->AliceJS: onicecandidate event with null candidate | |||
AliceJS->AliceUA: get |offer-A1| from pendingLocalDescription | AliceJS->AliceUA: get |offer-A1| from pendingLocalDescription | |||
// |offer-A1| is sent over signaling protocol to Bob | // |offer-A1| is sent over signaling protocol to Bob | |||
AliceJS->WebServer: signaling with |offer-A1| | AliceJS->WebServer: signaling with |offer-A1| | |||
WebServer->BobJS: signaling with |offer-A1| | WebServer->BobJS: signaling with |offer-A1| | |||
// |offer-A1| arrives at Bob | // |offer-A1| arrives at Bob | |||
BobJS->BobUA: create a PeerConnection | BobJS->BobUA: create a PeerConnection | |||
BobJS->BobUA: setRemoteDescription with |offer-A1| | BobJS->BobUA: setRemoteDescription with |offer-A1| | |||
BobUA->BobJS: onaddstream event with remoteStream | BobUA->BobJS: onaddstream event with remoteStream | |||
// Bob accepts call | // Bob accepts call | |||
BobJS->BobUA: addStream with local media | BobJS->BobUA: addTrack with local tracks | |||
BobJS->BobUA: createAnswer | BobJS->BobUA: createAnswer | |||
BobJS->BobUA: setLocalDescription with answer | BobJS->BobUA: setLocalDescription with answer | |||
BobUA->BobJS: multiple onicecandidate events with candidates | BobUA->BobJS: multiple onicecandidate events with candidates | |||
// wait for ICE gathering to complete | // wait for ICE gathering to complete | |||
BobUA->BobJS: onicecandidate event with null candidate | BobUA->BobJS: onicecandidate event with null candidate | |||
BobJS->BobUA: get |answer-A1| from currentLocalDescription | BobJS->BobUA: get |answer-A1| from currentLocalDescription | |||
// |answer-A1| is sent over signaling protocol to Alice | // |answer-A1| is sent over signaling protocol to Alice | |||
BobJS->WebServer: signaling with |answer-A1| | BobJS->WebServer: signaling with |answer-A1| | |||
skipping to change at page 63, line 39 ¶ | skipping to change at page 66, line 39 ¶ | |||
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. | |||
// set up local media state | // set up local media state | |||
AliceJS->AliceUA: create new PeerConnection | AliceJS->AliceUA: create new PeerConnection | |||
AliceJS->AliceUA: addStream that contains audio track | AliceJS->AliceUA: addTrack with an audio track | |||
AliceJS->AliceUA: createDataChannel to get data channel | AliceJS->AliceUA: createDataChannel to get data channel | |||
AliceJS->AliceUA: createOffer to get |offer-B1| | AliceJS->AliceUA: createOffer to get |offer-B1| | |||
AliceJS->AliceUA: setLocalDescription with |offer-B1| | AliceJS->AliceUA: setLocalDescription with |offer-B1| | |||
// |offer-B1| is sent over signaling protocol to Bob | // |offer-B1| is sent over signaling protocol to Bob | |||
AliceJS->WebServer: signaling with |offer-B1| | AliceJS->WebServer: signaling with |offer-B1| | |||
WebServer->BobJS: signaling with |offer-B1| | WebServer->BobJS: signaling with |offer-B1| | |||
// |offer-B1| arrives at Bob | // |offer-B1| arrives at Bob | |||
BobJS->BobUA: create a PeerConnection | BobJS->BobUA: create a PeerConnection | |||
skipping to change at page 64, line 16 ¶ | skipping to change at page 67, line 16 ¶ | |||
AliceJS->WebServer: signaling with |candidate-B1| | AliceJS->WebServer: signaling with |candidate-B1| | |||
AliceUA->AliceJS: onicecandidate event with |candidate-B2| (srflx) | AliceUA->AliceJS: onicecandidate event with |candidate-B2| (srflx) | |||
AliceJS->WebServer: signaling with |candidate-B2| | AliceJS->WebServer: signaling with |candidate-B2| | |||
WebServer->BobJS: signaling with |candidate-B1| | WebServer->BobJS: signaling with |candidate-B1| | |||
BobJS->BobUA: addIceCandidate with |candidate-B1| | BobJS->BobUA: addIceCandidate with |candidate-B1| | |||
WebServer->BobJS: signaling with |candidate-B2| | WebServer->BobJS: signaling with |candidate-B2| | |||
BobJS->BobUA: addIceCandidate with |candidate-B2| | BobJS->BobUA: addIceCandidate with |candidate-B2| | |||
// Bob accepts call | // Bob accepts call | |||
BobJS->BobUA: addStream with local audio stream | BobJS->BobUA: addTrack with local audio | |||
BobJS->BobUA: createDataChannel to get data channel | BobJS->BobUA: createDataChannel to get data channel | |||
BobJS->BobUA: createAnswer to get |answer-B1| | BobJS->BobUA: createAnswer to get |answer-B1| | |||
BobJS->BobUA: setLocalDescription with |answer-B1| | BobJS->BobUA: setLocalDescription with |answer-B1| | |||
// |answer-B1| is sent to Alice | // |answer-B1| is sent to Alice | |||
BobJS->WebServer: signaling with |answer-B1| | BobJS->WebServer: signaling with |answer-B1| | |||
WebServer->AliceJS: signaling with |answer-B1| | WebServer->AliceJS: signaling with |answer-B1| | |||
AliceJS->AliceUA: setRemoteDescription with |answer-B1| | AliceJS->AliceUA: setRemoteDescription with |answer-B1| | |||
AliceUA->AliceJS: onaddstream event with audio track from Bob | AliceUA->AliceJS: onaddstream event with audio track from Bob | |||
skipping to change at page 64, line 50 ¶ | skipping to change at page 67, line 50 ¶ | |||
AliceUA->AliceJS: ondatachannel event | AliceUA->AliceJS: ondatachannel event | |||
BobUA->BobJS: onopen | BobUA->BobJS: onopen | |||
AliceUA->AliceJS: onopen | AliceUA->AliceJS: onopen | |||
// media is flowing between browsers | // media is flowing between browsers | |||
BobUA->AliceUA: audio+data sent from Bob to Alice | BobUA->AliceUA: audio+data sent from Bob to Alice | |||
AliceUA->BobUA: audio+data sent from Alice to Bob | AliceUA->BobUA: audio+data sent from Alice to Bob | |||
// some time later Bob adds two video streams | // some time later Bob adds two video streams | |||
// note, no candidates exchanged, because of bundle | // note, no candidates exchanged, because of bundle | |||
BobJS->BobUA: addStream with first video stream | BobJS->BobUA: addTrack with first video stream | |||
BobJS->BobUA: addStream with second video stream | BobJS->BobUA: addTrack with second video stream | |||
BobJS->BobUA: createOffer to get |offer-B2| | BobJS->BobUA: createOffer to get |offer-B2| | |||
BobJS->BobUA: setLocalDescription with |offer-B2| | BobJS->BobUA: setLocalDescription with |offer-B2| | |||
// |offer-B2| is sent to Alice | // |offer-B2| is sent to Alice | |||
BobJS->WebServer: signaling with |offer-B2| | BobJS->WebServer: signaling with |offer-B2| | |||
WebServer->AliceJS: signaling with |offer-B2| | WebServer->AliceJS: signaling with |offer-B2| | |||
AliceJS->AliceUA: setRemoteDescription with |offer-B2| | AliceJS->AliceUA: setRemoteDescription with |offer-B2| | |||
AliceUA->AliceJS: onaddstream event with first video stream | AliceUA->AliceJS: onaddstream event with first video stream | |||
AliceUA->AliceJS: onaddstream event with second video stream | AliceUA->AliceJS: onaddstream event with second video stream | |||
AliceJS->AliceUA: createAnswer to get |answer-B2| | AliceJS->AliceUA: createAnswer to get |answer-B2| | |||
skipping to change at page 75, line 48 ¶ | skipping to change at page 78, line 48 ¶ | |||
[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 | 11.2. Informative References | |||
[I-D.ietf-avtext-rid] | ||||
Roach, A., Nandakumar, S., and P. Thatcher, "RTP Stream | ||||
Identifier (RID) Source Description (SDES)", draft-ietf- | ||||
avtext-rid-00 (work in progress), February 2016. | ||||
[I-D.ietf-mmusic-rid] | ||||
Thatcher, P., Zanaty, M., Nandakumar, S., Burman, B., | ||||
Roach, A., and B. Campen, "RTP Payload Format | ||||
Constraints", draft-ietf-mmusic-rid-04 (work in progress), | ||||
February 2016. | ||||
[I-D.ietf-mmusic-sdp-simulcast] | ||||
Burman, B., Westerlund, M., Nandakumar, S., and M. Zanaty, | ||||
"Using Simulcast in SDP and RTP Sessions", draft-ietf- | ||||
mmusic-sdp-simulcast-04 (work in progress), February 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. | |||
[I-D.shieh-rtcweb-ip-handling] | [I-D.shieh-rtcweb-ip-handling] | |||
Shieh, G. and J. Uberti, "WebRTC IP Address Handling | Shieh, G. and J. Uberti, "WebRTC IP Address Handling | |||
Recommendations", draft-shieh-rtcweb-ip-handling-00 (work | Recommendations", draft-shieh-rtcweb-ip-handling-00 (work | |||
in progress), October 2015. | in progress), October 2015. | |||
skipping to change at page 77, line 22 ¶ | skipping to change at page 80, line 35 ¶ | |||
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-14: | ||||
o Added discussion of RtpTransceivers + RtpSenders + RtpReceivers, | ||||
and how they interact with createOffer/createAnswer. | ||||
o Removed obsolete OfferToReceiveX options. | ||||
o Explained how addIceCandidate can be used for end-of-candidates. | ||||
Changes in draft-13: | Changes in draft-13: | |||
o Clarified which SDP lines can be ignored. | o Clarified which SDP lines can be ignored. | |||
o Clarified how to handle various received attributes. | o Clarified how to handle various received attributes. | |||
o Revised how atttributes should be generated for bundled m= lines. | o Revised how atttributes should be generated for bundled m= lines. | |||
o Remove unused references. | o Remove unused references. | |||
skipping to change at page 81, line 37 ¶ | skipping to change at page 85, line 11 ¶ | |||
o Suggested API and examples have been moved to an appendix. | o Suggested API and examples have been moved to an appendix. | |||
Changes in draft -00: | Changes in draft -00: | |||
o Migrated from draft-uberti-rtcweb-jsep-02. | o Migrated from draft-uberti-rtcweb-jsep-02. | |||
Authors' Addresses | Authors' Addresses | |||
Justin Uberti | Justin Uberti | |||
747 6th Ave 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 | 170 West Tasman Drive | |||
San Jose, CA 95134 | San Jose, CA 95134 | |||
USA | USA | |||
End of changes. 72 change blocks. | ||||
294 lines changed or deleted | 447 lines changed or added | |||
This html diff was produced by rfcdiff 1.44. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |