@@ -1312,6 +1312,13 @@ <h4>
13121312 initialized to <code>null</code>.
13131313 </p>
13141314 </li>
1315+ <li>
1316+ <p>
1317+ Let <var>connection</var> have an
1318+ <dfn data-dfn-for="RTCPeerConnection" class="export">[[\LastStableStateSctpTransport]]</dfn> internal slot,
1319+ initialized to <code>null</code>.
1320+ </p>
1321+ </li>
13151322 <li>
13161323 <p>
13171324 Let <var>connection</var> have a
@@ -1819,56 +1826,70 @@ <h4>
18191826 If <var>description</var> is of type
18201827 {{RTCSdpType/"offer"}} and
18211828 <var>connection</var>.{{RTCPeerConnection/[[SignalingState]]}}
1822- is {{RTCSignalingState/"stable"}} then for each
1823- <var>transceiver</var> in <var>connection</var>'s [=
1824- set of transceivers =], run the following steps:
1829+ is {{RTCSignalingState/"stable"}}, then run the following steps:
18251830 </p>
18261831 <ol>
18271832 <li>
18281833 <p>
18291834 Set
1830- <var>transceiver</var>.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[LastStableStateSenderTransport]]}}
1831- to
1832- <var>transceiver</var>.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SenderTransport]]}}.
1833- </p>
1834- </li>
1835- <li id="rollback-ridless">
1836- <p>
1837- If
1838- <var>transceiver</var>.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SendEncodings]]}}.length
1839- is `1` and the lone encoding [=map/contains=] no {{RTCRtpCodingParameters/rid}} member,
1840- then set
1841- <var>transceiver</var>.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[LastStableRidlessSendEncodings]]}}
1842- to
1843- <var>transceiver</var>.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SendEncodings]]}};
1844- Otherwise, set
1845- <var>transceiver</var>.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[LastStableRidlessSendEncodings]]}}
1846- to `null`.
1847- </p>
1848- </li>
1849- <li>
1850- <p>
1851- Set
1852- <var>transceiver</var>.{{RTCRtpTransceiver/[[Receiver]]}}.{{RTCRtpReceiver/[[LastStableStateReceiverTransport]]}}
1835+ <var>connection</var>.{{RTCPeerConnection/[[LastStableStateSctpTransport]]}}
18531836 to
1854- <var>transceiver</var>.{{RTCRtpTransceiver/[[Receiver]]}}.{{RTCRtpReceiver/[[ReceiverTransport]]}}.
1855- </p>
1856- </li>
1857- <li>
1858- <p>
1859- Set
1860- <var>transceiver</var>.{{RTCRtpTransceiver/[[Receiver]]}}.{{RTCRtpReceiver/[[LastStableStateAssociatedRemoteMediaStreams]]}}
1861- to
1862- <var>transceiver</var>.{{RTCRtpTransceiver/[[Receiver]]}}.{{RTCRtpReceiver/[[AssociatedRemoteMediaStreams]]}}.
1837+ <var>connection</var>.{{RTCPeerConnection/[[SctpTransport]]}}.
18631838 </p>
18641839 </li>
18651840 <li>
18661841 <p>
1867- Set
1868- <var>transceiver</var>.{{RTCRtpTransceiver/[[Receiver]]}}.{{RTCRtpReceiver/[[LastStableStateReceiveCodecs]]}}
1869- to
1870- <var>transceiver</var>.{{RTCRtpTransceiver/[[Receiver]]}}.{{RTCRtpReceiver/[[ReceiveCodecs]]}}.
1842+ For each <var>transceiver</var> in <var>connection</var>'s
1843+ [= set of transceivers =], run the following steps:
18711844 </p>
1845+ <ol>
1846+ <li>
1847+ <p>
1848+ Set
1849+ <var>transceiver</var>.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[LastStableStateSenderTransport]]}}
1850+ to
1851+ <var>transceiver</var>.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SenderTransport]]}}.
1852+ </p>
1853+ </li>
1854+ <li id="rollback-ridless">
1855+ <p>
1856+ If
1857+ <var>transceiver</var>.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SendEncodings]]}}.length
1858+ is `1` and the lone encoding [=map/contains=] no {{RTCRtpCodingParameters/rid}} member,
1859+ then set
1860+ <var>transceiver</var>.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[LastStableRidlessSendEncodings]]}}
1861+ to
1862+ <var>transceiver</var>.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[SendEncodings]]}};
1863+ Otherwise, set
1864+ <var>transceiver</var>.{{RTCRtpTransceiver/[[Sender]]}}.{{RTCRtpSender/[[LastStableRidlessSendEncodings]]}}
1865+ to `null`.
1866+ </p>
1867+ </li>
1868+ <li>
1869+ <p>
1870+ Set
1871+ <var>transceiver</var>.{{RTCRtpTransceiver/[[Receiver]]}}.{{RTCRtpReceiver/[[LastStableStateReceiverTransport]]}}
1872+ to
1873+ <var>transceiver</var>.{{RTCRtpTransceiver/[[Receiver]]}}.{{RTCRtpReceiver/[[ReceiverTransport]]}}.
1874+ </p>
1875+ </li>
1876+ <li>
1877+ <p>
1878+ Set
1879+ <var>transceiver</var>.{{RTCRtpTransceiver/[[Receiver]]}}.{{RTCRtpReceiver/[[LastStableStateAssociatedRemoteMediaStreams]]}}
1880+ to
1881+ <var>transceiver</var>.{{RTCRtpTransceiver/[[Receiver]]}}.{{RTCRtpReceiver/[[AssociatedRemoteMediaStreams]]}}.
1882+ </p>
1883+ </li>
1884+ <li>
1885+ <p>
1886+ Set
1887+ <var>transceiver</var>.{{RTCRtpTransceiver/[[Receiver]]}}.{{RTCRtpReceiver/[[LastStableStateReceiveCodecs]]}}
1888+ to
1889+ <var>transceiver</var>.{{RTCRtpTransceiver/[[Receiver]]}}.{{RTCRtpReceiver/[[ReceiveCodecs]]}}.
1890+ </p>
1891+ </li>
1892+ </ol>
18721893 </li>
18731894 </ol>
18741895 </li>
@@ -2011,13 +2032,29 @@ <h4>
20112032 </li>
20122033 </ol>
20132034 </li>
2035+ <li id="offer-sctp-transport" data-tests=
2036+ "RTCPeerConnection-createDataChannel.html,RTCSctpTransport-constructor.html,RTCSctpTransport-events.html,RTCSctpTransport-maxChannels.html">
2037+ <p>
2038+ If <var>description</var> is of type
2039+ {{RTCSdpType/"offer"}}, and it describes an
2040+ SCTP association as defined in [[RFC8841]]
2041+ Section 10.2, and
2042+ <var>connection</var>.{{RTCPeerConnection/[[SctpTransport]]}}
2043+ is <code>null</code>, set
2044+ <var>connection</var>.{{RTCPeerConnection/[[SctpTransport]]}}
2045+ to the result of
2046+ [= create an RTCSctpTransport|creating an RTCSctpTransport =]
2047+ with an initial state of
2048+ {{RTCSctpTransportState/"connecting"}}.
2049+ </p>
2050+ </li>
20142051 <li>
20152052 <p>
20162053 If <var>description</var> is of type
20172054 {{RTCSdpType/"answer"}}, and it initiates the closure
20182055 of an existing SCTP association, as defined in
2019- [[RFC8841]], Sections 10.3 and 10.4, set the value
2020- of <var>connection</var>.{{RTCPeerConnection/[[SctpTransport]]}} to
2056+ [[RFC8841]], Sections 10.3 and 10.4, set
2057+ <var>connection</var>.{{RTCPeerConnection/[[SctpTransport]]}} to
20212058 <code>null</code>.
20222059 </p>
20232060 </li>
@@ -2042,14 +2079,8 @@ <h4>
20422079 If <var>description</var> initiates the
20432080 establishment of a new SCTP association, as
20442081 defined in [[RFC8841]], Sections 10.3 and 10.4,
2045- [= create an RTCSctpTransport =] with an initial
2046- state of {{RTCSctpTransportState/"connecting"}}
2047- and assign the result to the
2048- {{RTCPeerConnection/[[SctpTransport]]}} slot. Otherwise, if an
2049- SCTP association is established, but the
2050- <code class="sdp">max-message-size</code> SDP
2051- attribute is updated, [= update the data max
2052- message size =] of
2082+ or an SCTP association already exists,
2083+ [= update the data max message size =] of
20532084 <var>connection</var>.{{RTCPeerConnection/[[SctpTransport]]}}.
20542085 </p>
20552086 </li>
@@ -2638,6 +2669,14 @@ <h4>
26382669 whichever one is not <code>null</code>.
26392670 </p>
26402671 </li>
2672+ <li>
2673+ <p>
2674+ Set
2675+ <var>connection</var>.{{RTCPeerConnection/[[SctpTransport]]}}
2676+ to
2677+ <var>connection</var>.{{RTCPeerConnection/[[LastStableStateSctpTransport]]}}.
2678+ </p>
2679+ </li>
26412680 <li>
26422681 <p>
26432682 For each <var>transceiver</var> in the
@@ -13761,9 +13800,8 @@ <h4 id="sctp-transport-create">
1376113800 <li>
1376213801 <p>
1376313802 Let <var>transport</var> have a
13764- <dfn data-dfn-for="RTCSctpTransport">[[\MaxMessageSize]]</dfn> internal slot and run the
13765- steps labeled [= update the data max message size =] to
13766- initialize it.
13803+ <dfn data-dfn-for="RTCSctpTransport">[[\MaxMessageSize]]</dfn> internal slot initialized to
13804+ <code>null</code>.
1376713805 </p>
1376813806 </li>
1376913807 <li data-tests="RTCSctpTransport-maxChannels.html">
@@ -13904,12 +13942,12 @@ <h4 id="sctp-transport-connected">
1390413942 </li>
1390513943 </ol>
1390613944 </section>
13907- <div>
13945+ <div id="idl-sctp-transport" >
1390813946 <pre class="idl" data-tests="idlharness.https.window.js">[Exposed=Window]
1390913947interface RTCSctpTransport : EventTarget {
1391013948 readonly attribute RTCDtlsTransport transport;
1391113949 readonly attribute RTCSctpTransportState state;
13912- readonly attribute unrestricted double maxMessageSize;
13950+ readonly attribute unrestricted double? maxMessageSize;
1391313951 readonly attribute unsigned short? maxChannels;
1391413952 attribute EventHandler onstatechange;
1391513953};</pre>
@@ -13944,7 +13982,7 @@ <h2>
1394413982 </dd>
1394513983 <dt data-tests="RTCSctpTransport-constructor.html">
1394613984 <dfn data-idl="">maxMessageSize</dfn> of type <span class=
13947- "idlAttrType">unrestricted double</span>, readonly
13985+ "idlAttrType">unrestricted double</span>, readonly, nullable
1394813986 </dt>
1394913987 <dd>
1395013988 <p>
0 commit comments