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;
81
74
82
75
// New methods for RTCRtpSender and RTCRtpReceiver
83
76
partial interface RTCRtpSender {
84
-
RTCInsertableStreams createEncodedStreams();
85
77
attribute RTCRtpTransform? transform;
86
78
};
87
79
88
80
partial interface RTCRtpReceiver {
89
-
RTCInsertableStreams createEncodedStreams();
90
81
attribute RTCRtpTransform? transform;
91
82
};
92
83
</pre>
@@ -101,7 +92,6 @@ argument, ensure that the codec is disabled and produces no output.
101
92
### Stream creation ### {#stream-creation}
102
93
103
94
At construction of each {{RTCRtpSender}} or {{RTCRtpReceiver}}, run the following steps:
104
-
1. Initialize [=this=].`[[Streams]]` to null.
105
95
2. Initialize [=this=].`[[transform]]` to null.
106
96
3. Initialize [=this=].`[[readable]]` to a new {{ReadableStream}}.
107
97
4. <a dfn for="ReadableStream">Set up</a>[=this=].`[[readable]]`. [=this=].`[[readable]]` is provided frames using the [=readEncodedData=] algorithm given |this| as parameter.
@@ -111,24 +101,12 @@ At construction of each {{RTCRtpSender}} or {{RTCRtpReceiver}}, run the followin
111
101
8. Set [=this=].`[[writable]]`.`[[owner]]` to |this|.
112
102
9. Initialize [=this=].`[[pipeToController]]` to null.
113
103
10. Initialize [=this=].`[[lastReceivedFrameTimestamp]]` to zero.
114
-
11. If the {{RTCPeerConnection}}'s configuration does not have {{RTCConfiguration/encodedInsertableStreams}} set to "true", [=queue a task=] to run the following steps:
104
+
11. [=Queue a task=] to run the following steps:
115
105
1. If [=this=].`[[pipeToController]]` is not null, abort these steps.
116
106
2. Set [=this=].`[[pipeToController]]` to a new {{AbortController}}.
117
107
<!-- FIXME: Use pipeTo algorithm when available. -->
118
108
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.
119
109
120
-
The <dfn method for="RTCRtpSender">createEncodedStreams()</dfn> method steps are:
121
-
122
-
1. If the {{RTCPeerConnection}}'s configuration does not have {{RTCConfiguration/encodedInsertableStreams}} set to "true", throw an "{{InvalidAccessError}}" {{DOMException}} and abort these steps.
123
-
2. If the data source does not permit access, throw an "{{InvalidAccessError}}" {{DOMException}} and abort these steps.
124
-
3. If [=this=].`[[Streams]]` is not null, throw an "{{InvalidAccessError}}" {{DOMException}}.
125
-
4. If [=this=].`[[pipeToController]]` is not null, throw an "{{InvalidAccessError}}" {{DOMException}}.
126
-
5. Set [=this=].`[[Streams]]` to an {{RTCInsertableStreams}} object.
127
-
6. Set [=this=].`[[Streams]]`.{{RTCInsertableStreams/readable}} to [=this=].`[[readable]]`.
128
-
7. Set [=this=].`[[Streams]]`.{{RTCInsertableStreams/writable}} to [=this=].`[[writable]]`.
129
-
8. Enable the encoded data source.
130
-
10. Return [=this=].`[[Streams]]`.
131
-
132
110
### Stream processing ### {#stream-processing}
133
111
134
112
The <dfn>readEncodedData</dfn> algorithm is given a |rtcObject| as parameter. It is defined by running the following steps:
0 commit comments