You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.bs
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -135,27 +135,27 @@ argument, ensure that the codec is disabled and produces no output.
135
135
### Stream creation ### {#stream-creation}
136
136
137
137
Let the {{RTCRtpSender}} or {{RTCRtpReceiver}} have an internal slot,
138
-
[[\Streams]], initialized to null.
138
+
`[[Streams]]`, initialized to null.
139
139
140
140
When {{RTCRtpSender/createEncodedStreams}}() is
141
141
called, run the following steps:
142
142
143
143
* If the {{RTCPeerConnection}}'s configuration does not have {{RTCConfiguration/encodedInsertableStreams}} set to "true", throw an {{InvalidStateError}} and abort these steps.
144
144
* If the data source does not permit access, throw an {{InvalidAccessError}} and abort these steps.
145
-
* If [[\Streams]] is not null, throw an {{InvalidStateError}}.
146
-
* Create an {{RTCInsertableStreams}} object 's'.
147
-
* Set s.readable to a ReadableStream representing the encoded data source.
148
-
* Set s.writable to a WritableStream representing the encoded data sink.
145
+
* If `[[Streams]]` is not null, throw an {{InvalidStateError}}.
146
+
* Create an {{RTCInsertableStreams}} object |s|.
147
+
* Set |s|.{{RTCInsertableStreams/readable}} to a {{ReadableStream}} representing the encoded data source.
148
+
* Set |s|.{{RTCInsertableStreams/writable}} to a {{WritableStream}} representing the encoded data sink.
149
149
* Enable the encoded data source.
150
-
* Store 's' in the internal slot [[\Streams]].
151
-
* Return 's'
150
+
* Store |s| in the internal slot `[[Streams]]`.
151
+
* Return |s|
152
152
153
153
### Stream processing ### {#stream-processing}
154
154
155
155
When a frame is produced from the encoded data source, place it on the
156
-
[[\Streams]].readableStream'.
156
+
`[[Streams]]`.{{RTCInsertableStreams/readable}}.
157
157
158
-
When a frame appears on the [[\Streams]].writable, do the following:
158
+
When a frame appears on the `[[Streams]]`.{{RTCInsertableStreams/writable}}, do the following:
159
159
* Check that the frame is a a valid frame that has been created by the encoded data source; if it is not, discard it. A processor cannot create frames, or move frames between streams.
160
160
* Check that the frame's {{RTCEncodedVideoFrame/timestamp}} is equal to or larger than any previously received frame. A processor cannot reorder frames, although it may delay them or drop them.
161
161
* Process the frame as if it came directly from the encoded data source.
@@ -175,6 +175,6 @@ otherwise unavailable, which allows some fingerprinting surface.
175
175
176
176
# Examples # {#examples}
177
177
178
-
See the explainer document.
178
+
See the [explainer document](https://github.com/w3c/webrtc-insertable-streams/blob/master/explainer.md#code-examples).
<p>At the time when a codec is initialized as part of the encoder, and the
1651
1651
corresponding flag is set in the <codeclass="idl"><adata-link-type="idl" href="https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection" id="ref-for-dom-rtcpeerconnection②">RTCPeerConnection</a></code>'s <codeclass="idl"><adata-link-type="idl" href="https://www.w3.org/TR/webrtc/#dom-rtcconfiguration" id="ref-for-dom-rtcconfiguration①">RTCConfiguration</a></code> argument, ensure that the codec is disabled and produces no output.</p>
<p>Let the <codeclass="idl"><adata-link-type="idl" href="https://www.w3.org/TR/webrtc/#dom-rtcrtpsender" id="ref-for-dom-rtcrtpsender②">RTCRtpSender</a></code> or <codeclass="idl"><adata-link-type="idl" href="https://www.w3.org/TR/webrtc/#dom-rtcrtpreceiver" id="ref-for-dom-rtcrtpreceiver②">RTCRtpReceiver</a></code> have an internal slot,
1654
-
[[\Streams]], initialized to null.</p>
1653
+
<p>Let the <codeclass="idl"><adata-link-type="idl" href="https://www.w3.org/TR/webrtc/#dom-rtcrtpsender" id="ref-for-dom-rtcrtpsender②">RTCRtpSender</a></code> or <codeclass="idl"><adata-link-type="idl" href="https://www.w3.org/TR/webrtc/#dom-rtcrtpreceiver" id="ref-for-dom-rtcrtpreceiver②">RTCRtpReceiver</a></code> have an internal slot, <code>[[Streams]]</code>, initialized to null.</p>
1655
1654
<p>When <codeclass="idl"><adata-link-type="idl" href="#dom-rtcrtpsender-createencodedstreams" id="ref-for-dom-rtcrtpsender-createencodedstreams">createEncodedStreams</a></code>() is
<p>If the data source does not permit access, throw an <codeclass="idl"><adata-link-type="idl" href="https://heycam.github.io/webidl/#invalidaccesserror" id="ref-for-invalidaccesserror">InvalidAccessError</a></code> and abort these steps.</p>
1662
1661
<lidata-md>
1663
-
<p>If [[\Streams]] is not null, throw an <codeclass="idl"><adata-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror①">InvalidStateError</a></code>.</p>
1662
+
<p>If <code>[[Streams]]</code> is not null, throw an <codeclass="idl"><adata-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror①">InvalidStateError</a></code>.</p>
1664
1663
<lidata-md>
1665
-
<p>Create an <codeclass="idl"><adata-link-type="idl" href="#dictdef-rtcinsertablestreams" id="ref-for-dictdef-rtcinsertablestreams②">RTCInsertableStreams</a></code> object 's'.</p>
1664
+
<p>Create an <codeclass="idl"><adata-link-type="idl" href="#dictdef-rtcinsertablestreams" id="ref-for-dictdef-rtcinsertablestreams②">RTCInsertableStreams</a></code> object <var>s</var>.</p>
1666
1665
<lidata-md>
1667
-
<p>Set s.readableto a ReadableStream representing the encoded data source.</p>
1666
+
<p>Set <var>s</var>.<codeclass="idl"><adata-link-type="idl" href="#dom-rtcinsertablestreams-readable" id="ref-for-dom-rtcinsertablestreams-readable">readable</a></code>to a <codeclass="idl"><adata-link-type="idl" href="https://streams.spec.whatwg.org/#readablestream" id="ref-for-readablestream①">ReadableStream</a></code> representing the encoded data source.</p>
1668
1667
<lidata-md>
1669
-
<p>Set s.writableto a WritableStream representing the encoded data sink.</p>
1668
+
<p>Set <var>s</var>.<codeclass="idl"><adata-link-type="idl" href="#dom-rtcinsertablestreams-writable" id="ref-for-dom-rtcinsertablestreams-writable">writable</a></code>to a <codeclass="idl"><adata-link-type="idl" href="https://streams.spec.whatwg.org/#writablestream" id="ref-for-writablestream①">WritableStream</a></code> representing the encoded data sink.</p>
1670
1669
<lidata-md>
1671
1670
<p>Enable the encoded data source.</p>
1672
1671
<lidata-md>
1673
-
<p>Store 's' in the internal slot [[\Streams]].</p>
1672
+
<p>Store <var>s</var> in the internal slot <code>[[Streams]]</code>.</p>
<p>When a frame is produced from the encoded data source, place it on the
1679
-
[[\Streams]].readableStream'.</p>
1680
-
<p>When a frame appears on the [[\Streams]].writable, do the following:</p>
1677
+
<p>When a frame is produced from the encoded data source, place it on the <code>[[Streams]]</code>.<codeclass="idl"><adata-link-type="idl" href="#dom-rtcinsertablestreams-readable" id="ref-for-dom-rtcinsertablestreams-readable①">readable</a></code>.</p>
1678
+
<p>When a frame appears on the <code>[[Streams]]</code>.<codeclass="idl"><adata-link-type="idl" href="#dom-rtcinsertablestreams-writable" id="ref-for-dom-rtcinsertablestreams-writable①">writable</a></code>, do the following:</p>
1681
1679
<ul>
1682
1680
<lidata-md>
1683
1681
<p>Check that the frame is a a valid frame that has been created by the encoded data source; if it is not, discard it. A processor cannot create frames, or move frames between streams.</p>
0 commit comments