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
130
+
partial interface RTCRtpSender {
131
+
RTCInsertableStreams createEncodedVideoStreams();
132
+
RTCInsertableStreams createEncodedAudioStreams();
133
+
};
134
+
135
+
partial interface RTCRtpReceiver {
136
+
RTCInsertableStreams createEncodedVideoStreams();
137
+
RTCInsertableStreams createEncodedAudioStreams();
89
138
};
90
139
</pre>
91
140
92
141
## 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]].
142
+
143
+
At the time when a codec is initialized as part of the encoder, and the
144
+
corresponding flag is set in the {{RTCPeerConnection}}'s {{RTCConfiguration}}
145
+
argument, ensure that the codec is disabled and produces no output.
146
+
147
+
When {{RTCRtpSender/createEncodedVideoStreams}}() or {{RTCRtpSender/createEncodedAudioStreams}}() is
148
+
called, run the following steps:
149
+
150
+
* If the kind of the sender does not match, throw a {{TypeError}} and abort these steps.
151
+
* If the data source does not permit access, throw an {{InvalidAccessError}} and abort these steps.
152
+
* Create an {{RTCInsertableStreams}} object 's'.
153
+
* Set s.readable to a ReadableStream representing the encoded data source.
154
+
* Set s.writable to a WritableStream representing the encoded data sink.
155
+
* Enable the encoded data source.
156
+
* Store 's' in an internal slot [[\streams]].
157
+
* Return 's'
158
+
159
+
When a frame is produced from the encoded data source, place it on the
160
+
[[\streams]].readable' stream.
161
+
162
+
When a frame appears on the [[\streams]].writable stream, process it as if it came
163
+
directly from the encoded data source.
116
164
117
165
# Privacy and security considerations # {#privacy}
118
166
@@ -123,7 +171,12 @@ However, streams that are isolated (as specified in
123
171
[[WEBRTC-IDENTITY]]) or tainted with another origin, cannot be
124
172
accessed using this API, since that would break the isolation rule.
125
173
174
+
The API will allow access to some aspects of timing information that are
175
+
otherwise unavailable, which allows some fingerprinting surface.
0 commit comments