Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
fippo committed Mar 23, 2023
1 parent 2386f6b commit 656ff65
Showing 1 changed file with 68 additions and 71 deletions.
139 changes: 68 additions & 71 deletions index.html
Expand Up @@ -521,9 +521,9 @@ <h3>
additional members.
</p>
<pre class="idl">partial dictionary RTCRtpEncodingParameters {
unsigned long ptime;
boolean adaptivePtime = false;
};</pre>
unsigned long ptime;
boolean adaptivePtime = false;
};</pre>
<section id="rtcrtpencodingparameters-attributes">
<h2>Dictionary {{RTCRtpEncodingParameters}} Members</h2>
<dl data-link-for="RTCRtpEncodingParameters" data-dfn-for="RTCRtpEncodingParameters" class="dictionary-members">
Expand Down Expand Up @@ -595,9 +595,9 @@ <h3>
updates the [=estimated capture clock offset=].
</p>
<pre class="idl">partial dictionary RTCRtpContributingSource {
DOMHighResTimeStamp captureTimestamp;
DOMHighResTimeStamp senderCaptureTimeOffset;
};</pre>
DOMHighResTimeStamp captureTimestamp;
DOMHighResTimeStamp senderCaptureTimeOffset;
};</pre>
<section id="rtcrtpcontributingsource-attributes">
<h2>Dictionary {{RTCRtpContributingSource}} Members</h2>
<dl data-link-for="RTCRtpContributingSource" data-dfn-for="RTCRtpContributingSource" class="dictionary-members">
Expand Down Expand Up @@ -703,74 +703,71 @@ <h2>Dictionary {{RTCRtpContributingSource}} Members</h2>
</dl>
</section>
</section>
<section id="rtcdatachannel-extensions">
<section id="rtcdatachannel-transferable">
<h3>
{{RTCDataChannel}} extensions
Transferable Data Channels
</h3>
<section>
<h3>Transferable Data Channels</h3>
<p>This document extends {{RTCDataChannel}} by making it <a data-cite="!HTML/#transferable-objects">transferable</a>.</p>
This allows sending and receiving messages outside the context the connection was created, for instance in workers or third-party iframes.</p>
<p>This document extends {{RTCDataChannel}} by making it <a data-cite="!HTML/#transferable-objects">transferable</a>.</p>
This allows sending and receiving messages outside the context the connection was created, for instance in workers or third-party iframes.</p>
<div>
<p>The WebIDL changes are the following:
<pre class="idl">
<p>The WebIDL changes are the following:
<pre class="idl">
[Exposed=(Window,Worker), Transferable]
partial interface RTCDataChannel {
};</pre>
</div>
<div>
<p>The <a data-cite="WEBRTC#dfn-create-an-rtcdatachannel">create an RTCDataChannel</a> algorithm is updated by adding the following steps after step 4 of the original algorithm:</p>
<ol>
<li><p>Initialize <var>channel</var>.`[[IsTransferable]]` to <code>true</code>.</p></li>
<li><p>Queue a task to run the following step:</p>
<ol>
<li><p>Set <var>channel</var>.`[[IsTransferable]]` to <code>false</code>.</p></li>
</ol>
</li>
</ol>
<p>This task needs to run before any task enqueued by the <a data-cite="WEBRTC#dfn-receive-an-rtcdatachannel-message">receiving messages on a data channel</a> algorithm for <var>channel</var>.
This ensures that no message is lost during the transfer of a {{RTCDataChannel}}.</p>
</div>
<div>The <a data-cite="WEBRTC#datachannel-send">send() algorithm</a> is modified by adding the following step after step 1 of the original algorithm:
<ol>
<li><p>Set <var>channel</var>.`[[IsTransferable]]` to <code>false</code>.</p></li>
</ol>
</div>
<div>
<p>The {{RTCDataChannel}} <a data-cite="!HTML/#transfer-steps">transfer steps</a>, given <var>value</var> and <var>dataHolder</var>, are:</p>
<ol>
<li><p>If <var>value</var>.`[[IsTransferable]]` is <code>false</code>, throw a "DataCloneError" DOMException.</p></li>
<li><p>Set <var>dataHolder</var>.`[[ReadyState]]` to <var>value</var>.<a href="WEBRTC#dfn-readystate">`[[ReadyState]]`</a>.</p></li>
<li><p>Set <var>dataHolder</var>.`[[DataChannelLabel]]` to <var>value</var>.<a href="WEBRTC#dfn-datachannellabel">`[[DataChannelLabel]]`</a>.</p></li>
<li><p>Set <var>dataHolder</var>.`[[Ordered]]` to <var>value</var>.<a href="WEBRTC#dfn-ordered">`[[Ordered]]`</a>.</p></li>
<li><p>Set <var>dataHolder</var>.`[[MaxPacketLifeTime]]` to <var>value</var>.<a href="WEBRTC#dfn-maxpacketlifetime"></a>.`[[MaxPacketLifeTime]]`</p></li>
<li><p>Set <var>dataHolder</var>.`[[MaxRetransmits]]` to <var>value</var>.<a href="WEBRTC#dfn-maxretransmits">`[[MaxRetransmits]]`</a>.</p></li>
<li><p>Set <var>dataHolder</var>.`[[DataChannelProtocol]]` to <var>value</var>.<a href="WEBRTC#dfn-datachannelprotocol">`[[DataChannelProtocol]]`</a>.</p></li>
<li><p>Set <var>dataHolder</var>.`[[Negotiated]]` to <var>value</var>.<a href="WEBRTC#dfn-negotiated">`[[Negotiated]]`</a>.</p></li>
<li><p>Set <var>dataHolder</var>.`[[DataChannelId]]` to <var>value</var>.<a href="WEBRTC#dfn-datachannelid">`[[DataChannelId]]`</a>.</p></li>
<li><p>Set <var>dataHolder</var>.`[[underlyingDataTransport]]` to <var>value</var> <a href="WEBRTC#dfn-data-transport">underlying data transport</a>.</p></li>
<li><p>Set <var>value</var>.`[[IsTransferable]]` to <code>false</code>.</p></li>
<li><p>Set <var>value</var>.`[[ReadyState]]` to <a data-cite="WEBRTC/#dom-rtcdatachannelstate-closed">"closed"</a>.</p></li>
</ol>
</div>
<div><p>The {{RTCDataChannel}} <a data-cite="!HTML/#transfer-receiving-steps">transfer-receiving steps</a>, given <var>dataHolder</var> and <var>channel</var>, are:</p>
<ol>
<li><p>Initialize <var>channel</var>.<a href="WEBRTC#dfn-readystate">`[[ReadyState]]`</a> to <var>dataHolder</var>.`[[ReadyState]]`.</p></li>
<li><p>Initialize <var>channel</var>.<a href="WEBRTC#dfn-datachannellabel">`[[DataChannelLabel]]`</a> to <var>dataHolder</var>.`[[\DataChannelLabel]]`.</p></li>
<li><p>Initialize <var>channel</var>.<a href="WEBRTC#dfn-ordered">`[[Ordered]]`</a> to <var>dataHolder</var>.`[[Ordered]]`.</p></li>
<li><p>Initialize <var>channel</var>.<a href="WEBRTC#dfn-maxpacketlifetime">`[[MaxPacketLifeTime]]`</a> to <var>dataHolder</var>.`[[MaxPacketLifeTime]]`.</p></li>
<li><p>Initialize <var>channel</var>.<a href="WEBRTC#dfn-maxretransmits">`[[MaxRetransmits]]`</a> to <var>dataHolder</var>.`[[MaxRetransmits]]`.</p></li>
<li><p>Initialize <var>channel</var>.<a href="WEBRTC#dfn-datachannelprotocol">`[[DataChannelProtocol]]`</a> to <var>dataHolder</var>.`[[DataChannelProtocol]]`.</p></li>
<li><p>Initialize <var>channel</var>.<a href="WEBRTC#dfn-negotiated">`[[Negotiated]]`</a> to <var>dataHolder</var>.`[[Negotiated]]`.</p></li>
<li><p>Initialize <var>channel</var>.<a href="WEBRTC#dfn-datachannelid">`[[DataChannelId]]`</a> to <var>dataHolder</var>.`[[DataChannelId]]`.</p></li>
<li><p>Initialize <var>channel</var> <a href="WEBRTC#dfn-data-transport">underlying data transport</a> to <var>dataHolder</var>.`[[underlyingDataTransport]]`.</p></li>
</ol>
<p>The above steps do not need to transfer <a href="WEBRTC#dfn-readystate">`[[BufferedAmount]]`</a> as its value will always be equal to <code>0</code>.
The reason is an {{RTCDataChannel}} can be transferred only if its <a data-cite="WEBRTC#datachannel-send">send() algorithm</a> was not called prior the transfer.</p>
<p>If the <a href="WEBRTC#dfn-data-transport">underlying data transport</a> is closed at the time of the <a data-cite="!HTML/#transfer-receiving-steps">transfer-receiving steps</a>,
the {{RTCDataChannel}} object will be closed by running the <a href="WEBRTC#announcing-a-data-channel-as-closed">announcing a data channel as closed</a> algorithm immediately after the <a data-cite="!HTML/#transfer-receiving-steps">transfer-receiving steps</a>.</p>
</div>
</section>
};</pre>
</div>
<div>
<p>The <a data-cite="WEBRTC#dfn-create-an-rtcdatachannel">create an RTCDataChannel</a> algorithm is updated by adding the following steps after step 4 of the original algorithm:</p>
<ol>
<li><p>Initialize <var>channel</var>.`[[IsTransferable]]` to <code>true</code>.</p></li>
<li><p>Queue a task to run the following step:</p>
<ol>
<li><p>Set <var>channel</var>.`[[IsTransferable]]` to <code>false</code>.</p></li>
</ol>
</li>
</ol>
<p>This task needs to run before any task enqueued by the <a data-cite="WEBRTC#dfn-receive-an-rtcdatachannel-message">receiving messages on a data channel</a> algorithm for <var>channel</var>.
This ensures that no message is lost during the transfer of a {{RTCDataChannel}}.</p>
</div>
<div>The <a data-cite="WEBRTC#datachannel-send">send() algorithm</a> is modified by adding the following step after step 1 of the original algorithm:
<ol>
<li><p>Set <var>channel</var>.`[[IsTransferable]]` to <code>false</code>.</p></li>
</ol>
</div>
<div>
<p>The {{RTCDataChannel}} <a data-cite="!HTML/#transfer-steps">transfer steps</a>, given <var>value</var> and <var>dataHolder</var>, are:</p>
<ol>
<li><p>If <var>value</var>.`[[IsTransferable]]` is <code>false</code>, throw a "DataCloneError" DOMException.</p></li>
<li><p>Set <var>dataHolder</var>.`[[ReadyState]]` to <var>value</var>.<a href="WEBRTC#dfn-readystate">`[[ReadyState]]`</a>.</p></li>
<li><p>Set <var>dataHolder</var>.`[[DataChannelLabel]]` to <var>value</var>.<a href="WEBRTC#dfn-datachannellabel">`[[DataChannelLabel]]`</a>.</p></li>
<li><p>Set <var>dataHolder</var>.`[[Ordered]]` to <var>value</var>.<a href="WEBRTC#dfn-ordered">`[[Ordered]]`</a>.</p></li>
<li><p>Set <var>dataHolder</var>.`[[MaxPacketLifeTime]]` to <var>value</var>.<a href="WEBRTC#dfn-maxpacketlifetime"></a>.`[[MaxPacketLifeTime]]`</p></li>
<li><p>Set <var>dataHolder</var>.`[[MaxRetransmits]]` to <var>value</var>.<a href="WEBRTC#dfn-maxretransmits">`[[MaxRetransmits]]`</a>.</p></li>
<li><p>Set <var>dataHolder</var>.`[[DataChannelProtocol]]` to <var>value</var>.<a href="WEBRTC#dfn-datachannelprotocol">`[[DataChannelProtocol]]`</a>.</p></li>
<li><p>Set <var>dataHolder</var>.`[[Negotiated]]` to <var>value</var>.<a href="WEBRTC#dfn-negotiated">`[[Negotiated]]`</a>.</p></li>
<li><p>Set <var>dataHolder</var>.`[[DataChannelId]]` to <var>value</var>.<a href="WEBRTC#dfn-datachannelid">`[[DataChannelId]]`</a>.</p></li>
<li><p>Set <var>dataHolder</var>.`[[underlyingDataTransport]]` to <var>value</var> <a href="WEBRTC#dfn-data-transport">underlying data transport</a>.</p></li>
<li><p>Set <var>value</var>.`[[IsTransferable]]` to <code>false</code>.</p></li>
<li><p>Set <var>value</var>.`[[ReadyState]]` to <a data-cite="WEBRTC/#dom-rtcdatachannelstate-closed">"closed"</a>.</p></li>
</ol>
</div>
<div><p>The {{RTCDataChannel}} <a data-cite="!HTML/#transfer-receiving-steps">transfer-receiving steps</a>, given <var>dataHolder</var> and <var>channel</var>, are:</p>
<ol>
<li><p>Initialize <var>channel</var>.<a href="WEBRTC#dfn-readystate">`[[ReadyState]]`</a> to <var>dataHolder</var>.`[[ReadyState]]`.</p></li>
<li><p>Initialize <var>channel</var>.<a href="WEBRTC#dfn-datachannellabel">`[[DataChannelLabel]]`</a> to <var>dataHolder</var>.`[[\DataChannelLabel]]`.</p></li>
<li><p>Initialize <var>channel</var>.<a href="WEBRTC#dfn-ordered">`[[Ordered]]`</a> to <var>dataHolder</var>.`[[Ordered]]`.</p></li>
<li><p>Initialize <var>channel</var>.<a href="WEBRTC#dfn-maxpacketlifetime">`[[MaxPacketLifeTime]]`</a> to <var>dataHolder</var>.`[[MaxPacketLifeTime]]`.</p></li>
<li><p>Initialize <var>channel</var>.<a href="WEBRTC#dfn-maxretransmits">`[[MaxRetransmits]]`</a> to <var>dataHolder</var>.`[[MaxRetransmits]]`.</p></li>
<li><p>Initialize <var>channel</var>.<a href="WEBRTC#dfn-datachannelprotocol">`[[DataChannelProtocol]]`</a> to <var>dataHolder</var>.`[[DataChannelProtocol]]`.</p></li>
<li><p>Initialize <var>channel</var>.<a href="WEBRTC#dfn-negotiated">`[[Negotiated]]`</a> to <var>dataHolder</var>.`[[Negotiated]]`.</p></li>
<li><p>Initialize <var>channel</var>.<a href="WEBRTC#dfn-datachannelid">`[[DataChannelId]]`</a> to <var>dataHolder</var>.`[[DataChannelId]]`.</p></li>
<li><p>Initialize <var>channel</var> <a href="WEBRTC#dfn-data-transport">underlying data transport</a> to <var>dataHolder</var>.`[[underlyingDataTransport]]`.</p></li>
</ol>
<p>The above steps do not need to transfer <a href="WEBRTC#dfn-readystate">`[[BufferedAmount]]`</a> as its value will always be equal to <code>0</code>.
The reason is an {{RTCDataChannel}} can be transferred only if its <a data-cite="WEBRTC#datachannel-send">send() algorithm</a> was not called prior the transfer.</p>
<p>If the <a href="WEBRTC#dfn-data-transport">underlying data transport</a> is closed at the time of the <a data-cite="!HTML/#transfer-receiving-steps">transfer-receiving steps</a>,
the {{RTCDataChannel}} object will be closed by running the <a href="WEBRTC#announcing-a-data-channel-as-closed">announcing a data channel as closed</a> algorithm immediately after the <a data-cite="!HTML/#transfer-receiving-steps">transfer-receiving steps</a>.</p>
</div>
</section>
<section id="rtp-header-extension-encryption">
<h3>RTP Header Extension Encryption</h3>
Expand Down Expand Up @@ -869,8 +866,8 @@ <h3>
[[CRYPTEX]].
</p>
<pre class="idl">partial dictionary RTCConfiguration {
RTCRtpHeaderEncryptionPolicy rtpHeaderEncryptionPolicy = "negotiate";
};</pre>
RTCRtpHeaderEncryptionPolicy rtpHeaderEncryptionPolicy = "negotiate";
};</pre>
<section>
<h2>
Dictionary {{RTCConfiguration}} Members
Expand Down

0 comments on commit 656ff65

Please sign in to comment.