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;
119
113
120
114
// New methods for RTCRtpSender and RTCRtpReceiver
121
115
partial interface RTCRtpSender {
122
-
RTCInsertableStreams createEncodedStreams();
123
116
attribute RTCRtpTransform? transform;
124
117
};
125
118
126
119
partial interface RTCRtpReceiver {
127
-
RTCInsertableStreams createEncodedStreams();
128
120
attribute RTCRtpTransform? transform;
129
121
};
130
122
</pre>
@@ -139,32 +131,19 @@ argument, ensure that the codec is disabled and produces no output.
139
131
### Stream creation ### {#stream-creation}
140
132
141
133
At construction of each {{RTCRtpSender}} or {{RTCRtpReceiver}}, run the following steps:
142
-
1. Initialize [=this=].`[[Streams]]` to null.
143
134
2. Initialize [=this=].`[[transform]]` to null.
144
135
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.
145
136
4. Set [=this=].`[[readable]]`.`[[owner]]` to |this|.
146
137
5. Initialize [=this=].`[[writable]]` to the result of [=WritableStream/creating=] a {{WritableStream}}, its [=WritableStream/create/writeAlgorithm=] set to [=writeEncodedData=] given |this| as parameter.
147
138
6. Set [=this=].`[[writable]]`.`[[owner]]` to |this|.
148
139
7. Initialize [=this=].`[[pipeToController]]` to null.
149
140
8. Initialize [=this=].`[[lastReceivedFrameTimestamp]]` to zero.
150
-
9. If the {{RTCPeerConnection}}'s configuration does not have {{RTCConfiguration/encodedInsertableStreams}} set to "true", queue a task to run the following steps:
141
+
9. [=Queue a task=] to run the following steps:
151
142
1. If [=this=].`[[pipeToController]]` is not null, abort these steps.
152
143
2. Set [=this=].`[[pipeToController]]` to a new {{AbortController}}.
153
144
<!-- FIXME: Use pipeTo algorithm when available. -->
154
145
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.
155
146
156
-
The <dfn method for="RTCRtpSender">createEncodedStreams()</dfn> method steps are:
157
-
158
-
1. If the {{RTCPeerConnection}}'s configuration does not have {{RTCConfiguration/encodedInsertableStreams}} set to "true", throw an "{{InvalidAccessError}}" {{DOMException}} and abort these steps.
159
-
2. If the data source does not permit access, throw an "{{InvalidAccessError}}" {{DOMException}} and abort these steps.
160
-
3. If [=this=].`[[Streams]]` is not null, throw an "{{InvalidAccessError}}" {{DOMException}}.
161
-
4. If [=this=].`[[pipeToController]]` is not null, throw an "{{InvalidAccessError}}" {{DOMException}}.
162
-
5. Set [=this=].`[[Streams]]` to an {{RTCInsertableStreams}} object.
163
-
6. Set [=this=].`[[Streams]]`.{{RTCInsertableStreams/readable}} to [=this=].`[[readable]]`.
164
-
7. Set [=this=].`[[Streams]]`.{{RTCInsertableStreams/writable}} to [=this=].`[[writable]]`.
165
-
8. Enable the encoded data source.
166
-
10. Return [=this=].`[[Streams]]`.
167
-
168
147
### Stream processing ### {#stream-processing}
169
148
170
149
The <dfn>readEncodedData</dfn> algorithm is given a |rtcObject| as parameter. It is defined by running the following steps:
0 commit comments