@@ -177,26 +177,31 @@ As [$writeEncodedData$] ensures that the transform cannot reorder frames, this w
177
177
178
178
## Extension attribute ## {#attribute}
179
179
180
- A RTCRtpTransform has two private slots called `[[readable]] ` and `[[writable]] `.
180
+ A RTCRtpTransform has private slots:
181
+ * `[[readable]] ` of type {{ReadableStream}} .
182
+ * `[[writable]] ` of type {{WritableStream}} .
183
+ * `[[owner]] ` of type {{RTCRtpSender}} or {{RTCRtpReceiver}} , initialized to null.
181
184
182
185
Each RTCRtpTransform has an <dfn abstract-op for=RTCRtpTransform>association steps</dfn> set, which is empty by default.
183
186
184
187
The <dfn attribute for="RTCRtpSender,RTCRtpReceiver">transform</dfn> getter steps are:
185
188
1. Return [=this=] .`[[transform]] `.
186
189
187
190
The `transform` setter steps are:
188
- 2. Let |transform| be the argument to the setter.
189
- 3. Let |checkedTransform| set to |transform| if it is not null or to an [=identity transform stream=] otherwise.
190
- 3. Let |reader| be the result of [=ReadableStream/getting a reader=] for |checkedTransform|.`[[readable]] `.
191
- 4. Let |writer| be the result of [=WritableStream/getting a writer=] for |checkedTransform|.`[[writable]] `.
192
- 5. Initialize |newPipeToController| to a new {{AbortController}} .
193
- 6. If [=this=] .`[[pipeToController]] ` is not null, run the following steps:
191
+ 1. Let |transform| be the argument to the setter.
192
+ 1. Let |checkedTransform| set to |transform| if it is not null or to an [=identity transform stream=] otherwise.
193
+ 1. If |checkedTransform|.`[[owner]] ` is not null, throw a {{InvalidStateError}} and abort these steps.
194
+ 1. Let |reader| be the result of [=ReadableStream/getting a reader=] for |checkedTransform|.`[[readable]] `.
195
+ 1. Let |writer| be the result of [=WritableStream/getting a writer=] for |checkedTransform|.`[[writable]] `.
196
+ 1. Set |checkedTransform|.`[[owner]] ` to [=this=] .
197
+ 1. Initialize |newPipeToController| to a new {{AbortController}} .
198
+ 1. If [=this=] .`[[pipeToController]] ` is not null, run the following steps:
194
199
1. [=AbortSignal/Add=] the [$chain transform algorithm$] to [=this=] .`[[pipeToController]] `'s [=AbortController/signal=] .
195
200
2. [=AbortController/signal abort=] on [=this=] .`[[pipeToController]] `.
196
- 7 . Else, run the [$chain transform algorithm$] steps.
197
- 8 . Set [=this=] .`[[pipeToController]] ` to |newPipeToController|.
198
- 9 . Set [=this=] .`[[transform]] ` to |transform|.
199
- 10 . Run the steps in the set of [$association steps$] of |transform| with [=this=] .
201
+ 1 . Else, run the [$chain transform algorithm$] steps.
202
+ 1 . Set [=this=] .`[[pipeToController]] ` to |newPipeToController|.
203
+ 1 . Set [=this=] .`[[transform]] ` to |transform|.
204
+ 1 . Run the steps in the set of [$association steps$] of |transform| with [=this=] .
200
205
201
206
The <dfn abstract-op>chain transform algorithm</dfn> steps are defined as:
202
207
1. If |newPipeToController|'s [=AbortController/signal=] is [=AbortSignal/aborted=] , abort these steps.
0 commit comments