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
typedef (SFrameTransform or RTCRtpScriptTransform) RTCRtpTransform;
@@ -160,31 +161,31 @@ argument, ensure that the codec is disabled and produces no output.
160
161
### Stream creation ### {#stream-creation}
161
162
162
163
At construction of each {{RTCRtpSender}} or {{RTCRtpReceiver}}, run the following steps:
163
-
1. Initialize `[[Streams]]` to null.
164
-
2. Initialize `[[transform]]` to null.
165
-
3. Initialize `[[readable]]` to the result of <a dfn for="ReadableStream">creating</a> a {{ReadableStream}}. `[[readable]]` is provided frames using the [=readEncodedData=] algorithm given |this| as parameter.
166
-
4. Set `[[readable]]`.`[[owner]]` to |this|.
167
-
5. Initialize `[[writable]]` to the result of [=WritableStream/creating=] a {{WritableStream}}, its [=WritableStream/create/writeAlgorithm=] set to [=writeEncodedData=] given |this| as parameter.
168
-
6. Set `[[writable]]`.`[[owner]]` to |this|.
169
-
7. Initialize `[[pipeToController]]` to null.
170
-
8. Initialize `[[lastReceivedFrameTimestamp]]` to zero.
164
+
1. Initialize [=this=].`[[Streams]]` to null.
165
+
2. Initialize [=this=].`[[transform]]` to null.
166
+
3. Initialize [=this=].`[[readable]]` to the result of <a dfn for="ReadableStream">creating</a> a {{ReadableStream}}. `[[readable]]` is provided frames using the [=readEncodedData=] algorithm given |this| as parameter.
167
+
4. Set [=this=].`[[readable]]`.`[[owner]]` to |this|.
168
+
5. Initialize [=this=].`[[writable]]` to the result of [=WritableStream/creating=] a {{WritableStream}}, its [=WritableStream/create/writeAlgorithm=] set to [=writeEncodedData=] given |this| as parameter.
169
+
6. Set [=this=].`[[writable]]`.`[[owner]]` to |this|.
170
+
7. Initialize [=this=].`[[pipeToController]]` to null.
171
+
8. Initialize [=this=].`[[lastReceivedFrameTimestamp]]` to zero.
171
172
9. If the {{RTCPeerConnection}}'s configuration does not have {{RTCConfiguration/encodedInsertableStreams}} set to "true", queue a task to run the following steps:
172
-
1. If `[[pipeToController]]` is not null, abort these steps.
173
-
2. Call <a href="https://streams.spec.whatwg.org/#readable-stream-pipe-to">pipeTo</a> with `[[readable]]`, `[[writable]]`, preventClose equal to true, preventAbort equal to true, preventCancel equal to true and `[[pipeToController]]`.signal.
173
+
1. If [=this=].`[[pipeToController]]` is not null, abort these steps.
174
+
2. Set [=this=].`[[pipeToController]]` to a new {{AbortController}}.
175
+
3. Call <a href="https://streams.spec.whatwg.org/#readable-stream-pipe-to">pipeTo</a> with [=this=].`[[readable]]`, [=this=].`[[writable]]`, preventClose equal to true, preventAbort equal to true, preventCancel equal to true and [=this=].`[[pipeToController]]`.signal.
174
176
175
177
When {{RTCRtpSender/createEncodedStreams}}() is
176
178
called, run the following steps:
177
179
178
-
1. If the {{RTCPeerConnection}}'s configuration does not have {{RTCConfiguration/encodedInsertableStreams}} set to "true", throw an {{InvalidStateError}} and abort these steps.
180
+
1. If the {{RTCPeerConnection}}'s configuration does not have {{RTCConfiguration/encodedInsertableStreams}} set to "true", throw an "{{InvalidAccessError}}" {{DOMException}} and abort these steps.
179
181
2. If the data source does not permit access, throw an "{{InvalidAccessError}}" {{DOMException}} and abort these steps.
180
-
3. If `[[Streams]]` is not null, throw an {{InvalidStateError}}.
181
-
4. If `[[pipeToController]]` is not null, throw an {{InvalidStateError}}.
182
-
5. Create an {{RTCInsertableStreams}} object |s|.
183
-
6. Set |s|.{{RTCInsertableStreams/readable}} to `[[readable]]`.
184
-
7. Set |s|.{{RTCInsertableStreams/writable}} to `[[writable]]`.
182
+
3. If [=this=].`[[Streams]]` is not null, throw an "{{InvalidAccessError}}" {{DOMException}}.
183
+
4. If [=this=].`[[pipeToController]]` is not null, throw an "{{InvalidAccessError}}" {{DOMException}}.
184
+
5. Set [=this=].`[[Streams]]` to an {{RTCInsertableStreams}} object.
185
+
6. Set [=this=].`[[Streams]]`.{{RTCInsertableStreams/readable}} to [=this=].`[[readable]]`.
186
+
7. Set [=this=].`[[Streams]]`.{{RTCInsertableStreams/writable}} to [=this=].`[[writable]]`.
185
187
8. Enable the encoded data source.
186
-
9. Store |s| in the internal slot `[[Streams]]`.
187
-
10. Return |s|
188
+
10. Return [=this=].`[[Streams]]`.
188
189
189
190
### Stream processing ### {#stream-processing}
190
191
@@ -213,20 +214,20 @@ On getting the transform attribute, the user agent MUST run the following steps:
213
214
On setting the transform attribute, the user agent MUST run the following steps:
214
215
1. Let |rtcObject| be the {{RTCRtpReceiver}} or {{RTCRtpSender}} on which the setter is invoked.
215
216
2. Let |transform| be the argument to the setter.
216
-
3. Let |checkedTransform| set to |transform| if it is not null or to an <a href="https://streams.spec.whatwg.org/#identity-transform-stream">identity transform</a> otherwise.
217
-
3. Let |reader| be the result of <a href="https://streams.spec.whatwg.org/#readablestream-get-a-reader">getting a reader</a> for |checkedTransform|.`[[readable]]`.
218
-
4. Let |writer| be the result of <a href="https://streams.spec.whatwg.org/#writablestream-get-a-writer">getting a writer</a> for |checkedTransform|.`[[writable]]`.
219
-
5. Initialize |newPipeToController| to a new AbortController.
217
+
3. Let |checkedTransform| set to |transform| if it is not null or to an [=identity transform stream=] otherwise.
218
+
3. Let |reader| be the result of [=ReadableStream/getting a reader=] for |checkedTransform|.`[[readable]]`.
219
+
4. Let |writer| be the result of [=WritableStream/getting a writer=] for |checkedTransform|.`[[writable]]`.
220
+
5. Initialize |newPipeToController| to a new {{AbortController}}.
220
221
6. If |rtcObject|.`[[pipeToController]]` is not null, run the following steps:
221
-
1. <a href="https://dom.spec.whatwg.org/#abortsignal-add">Add</a> the [=chain transform algorithm=] to |rtcObject|.`[[pipeToController]]`:
222
-
2. Call <a href="https://dom.spec.whatwg.org/#abortsignal-signal-abort">abort</a> on |rtcObject|.`[[pipeToController]]`.
222
+
1. [=AbortSignal/Add=] the [=chain transform algorithm=] to |rtcObject|.`[[pipeToController]]`:
4. Assert that |newPipeToController| is the same object as |rtcObject|.`[[pipeToController]]`.
232
233
5. Call <a href="https://streams.spec.whatwg.org/#readable-stream-pipe-to">pipeTo</a> with |rtcObject|.`[[readable]]`, |checkedTransform|.`[[writable]]`, preventClose equal to false, preventAbort equal to false, preventCancel equal to true and |newPipeToController|.signal.
@@ -242,11 +243,11 @@ Similarly, if a web application sets the transform synchronously at creation of
242
243
243
244
The <dfn constructor for="SFrameTransform" lt="SFrameTransform(options)"><code>new SFrameTransform(<var>options</var>)</code></dfn> constructor steps are:
244
245
1. Let |transformAlgorithm| be an algorithm which takes a |frame| as input and runs the <a href="#sframe-transform-algorithm">SFrame transform algorithm</a> with |this| and |frame|.
245
-
2. Set |this|.<a href="https://streams.spec.whatwg.org/#generictransformstream-transform">`[[transform]]`</a> to the result of [=TransformStream/creating=] a {{TransformStream}}, with [=TransformStream/create/transformAlgorithm=] set to |transformAlgorithm|.
246
+
2. Set |this|.`[[transform]]` to the result of [=TransformStream/creating=] a {{TransformStream}}, with [=TransformStream/create/transformAlgorithm=] set to |transformAlgorithm|.
246
247
3. Let |options| be the method's first argument.
247
248
4. Set |this|.`[[role]]` to |options|["{{SFrameTransportOptions/role}}"].
248
-
5. Set |this|.`[[readable]]` to |this|.<a href="https://streams.spec.whatwg.org/#generictransformstream-transform">`[[transform]]`</a>.`[[readable]]`.
249
-
6. Set |this|.`[[writable]]` to |this|.<a href="https://streams.spec.whatwg.org/#generictransformstream-transform">`[[transform]]`</a>.`[[writable]]`.
249
+
5. Set |this|.`[[readable]]` to |this|.`[[transform]]`.`[[readable]]`.
250
+
6. Set |this|.`[[writable]]` to |this|.`[[transform]]`.`[[writable]]`.
0 commit comments