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
// New methods for RTCRtpSender and RTCRtpReceiver
133
+
partial interface RTCRtpSender {
134
+
RTCInsertableStreams createEncodedVideoStreams();
135
+
RTCInsertableStreams createEncodedAudioStreams();
136
+
};
137
+
138
+
partial interface RTCRtpReceiver {
139
+
RTCInsertableStreams createEncodedVideoStreams();
140
+
RTCInsertableStreams createEncodedAudioStreams();
89
141
};
90
142
</pre>
91
143
92
144
## Extension operation ## {#operation}
93
-
At creation of an RTCPeerConnection, the following steps are added to
94
-
the creation algorithm:
95
-
96
-
* Let the RTCPeerConnection object have two internal slots named [[\EncoderFactory]] and [[\DecoderFactory]], initialized to null.
97
-
* If the RTCConfiguration parameter contains a value for "encoderFactory", store that in [[\EncoderFactory]].
98
-
* If the RTCConfiguration parameter contains a value for "decoderFactory", store that in [[\DecoderFactory]].
99
-
100
-
At the time when a codec is initialized as part of the encoder, run
101
-
the following steps:
102
-
103
-
* If the unencoded data source does not permit access, abort these steps. (OPEN ISSUE: How is this error surfaced?)
104
-
* Let the unencoded data source be represented by a ReadableStream called "source".
105
-
* Let the encoded data sink be represented by a WriteableStream called
106
-
* "sink".
107
-
* Let the internal encoder object be called "internalEncoder". "internalEncoder" will have a WritableStream property called "writable" (by virtue of being an instance of WebCodec).
108
-
* "internalEncoder" will have a ReadableStream property called "readable".
109
-
* If the PeerConnection's [[\EncoderFactory]] is null, pipe "source" to "writable", and pipe "readable" to "sink", and skip the rest of these steps.
110
-
* Call the function stored in [[\EncoderFactory]], using the newly initialized encoder and its parameters as arguments.
111
-
* Let the return value from the function be "encoder".
112
-
* If "encoder" has an attribute "readable", pipe it to "sink". Otherwise, pipe the "internalEncoder"'s "readable" to "sink".
113
-
* If "encoder" has an attribute "writable", pipe "source" to it. Otherwise, pipe "source" to the "internalEncoder"'s "writable".
114
-
115
-
The media will then be processed according to the rules of [[WEB-CODECS]].
145
+
146
+
At the time when a codec is initialized as part of the encoder, and the
147
+
corresponding flag is set in the {{RTCPeerConnection}}'s {{RTCConfiguration}}
148
+
argument, ensure that the codec is disabled and produces no output.
149
+
150
+
Let the {{RTCRtpSender}} or {{RTCRtpReceiver}} have an internal slot,
151
+
[[\Streams]], initialized to null.
152
+
153
+
When {{RTCRtpSender/createEncodedVideoStreams}}() or {{RTCRtpSender/createEncodedAudioStreams}}() is
154
+
called, run the following steps:
155
+
156
+
* If the kind of the sender does not match, throw a {{TypeError}} and abort these steps.
157
+
* If the data source does not permit access, throw an {{InvalidAccessError}} and abort these steps.
158
+
* If [[\Streams]] is not null, throw an {{InvalidStateError}}.
159
+
* Create an {{RTCInsertableStreams}} object 's'.
160
+
* Set s.readableStream to a ReadableStream representing the encoded data source.
161
+
* Set s.writableStream to a WritableStream representing the encoded data sink.
162
+
* Enable the encoded data source.
163
+
* Store 's' in the internal slot [[\Streams]].
164
+
* Return 's'
165
+
166
+
When a frame is produced from the encoded data source, place it on the
167
+
[[\Streams]].readableStream'.
168
+
169
+
When a frame appears on the [[\Streams]].writableStream, process it as if it came
170
+
directly from the encoded data source.
116
171
117
172
# Privacy and security considerations # {#privacy}
118
173
@@ -123,7 +178,12 @@ However, streams that are isolated (as specified in
123
178
[[WEBRTC-IDENTITY]]) or tainted with another origin, cannot be
124
179
accessed using this API, since that would break the isolation rule.
125
180
181
+
The API will allow access to some aspects of timing information that are
182
+
otherwise unavailable, which allows some fingerprinting surface.
0 commit comments