@@ -85,8 +85,8 @@ insert the processing into the pipeline.
85
85
<pre class="idl">
86
86
// New dictionary.
87
87
dictionary RTCInsertableStreams {
88
- ReadableStream readable ;
89
- WritableStream writable ;
88
+ ReadableStream readableStream ;
89
+ WritableStream writableStream ;
90
90
};
91
91
92
92
// New enum for video frame types. Will eventually re-use the equivalent defined
@@ -97,26 +97,29 @@ enum RTCEncodedVideoFrameType {
97
97
"delta",
98
98
};
99
99
100
- dictionary RTCFrameMetadata {
100
+ dictionary RTCVideoFrameMetadata {
101
101
long synchronizationSource;
102
102
sequence<long> contributingSources;
103
103
};
104
104
105
105
// New interfaces to define encoded video and audio frames. Will eventually
106
106
// re-use or extend the equivalent defined in WebCodecs.
107
- // The additionalData fields contain metadata about the frame and will
108
- // eventually be exposed differently.
109
107
interface RTCEncodedVideoFrame {
110
108
readonly attribute RTCEncodedVideoFrameType type;
111
109
readonly attribute unsigned long long timestamp;
112
110
attribute ArrayBuffer data;
113
- RTCFrameMetadata getMetadata();
111
+ RTCVideoFrameMetadata getMetadata();
112
+ };
113
+
114
+ dictionary RTCAudioFrameMetadata {
115
+ long synchronizationSource;
116
+ sequence<long> contributingSources;
114
117
};
115
118
116
119
interface RTCEncodedAudioFrame {
117
120
readonly attribute unsigned long long timestamp;
118
121
attribute ArrayBuffer data;
119
- RTCFrameMetadata getMetadata();
122
+ RTCAudioFrameMetadata getMetadata();
120
123
};
121
124
122
125
@@ -144,22 +147,26 @@ At the time when a codec is initialized as part of the encoder, and the
144
147
corresponding flag is set in the {{RTCPeerConnection}} 's {{RTCConfiguration}}
145
148
argument, ensure that the codec is disabled and produces no output.
146
149
150
+ Let the {{RTCRtpSender}} or {{RTCRtpReceiver}} have an internal slot,
151
+ [[\Streams]] , initialized to null.
152
+
147
153
When {{RTCRtpSender/createEncodedVideoStreams}} () or {{RTCRtpSender/createEncodedAudioStreams}} () is
148
154
called, run the following steps:
149
155
150
156
* If the kind of the sender does not match, throw a {{TypeError}} and abort these steps.
151
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}} .
152
159
* 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.
160
+ * Set s.readableStream to a ReadableStream representing the encoded data source.
161
+ * Set s.writableStream to a WritableStream representing the encoded data sink.
155
162
* Enable the encoded data source.
156
- * Store 's' in an internal slot [[\streams ]] .
163
+ * Store 's' in the internal slot [[\Streams ]] .
157
164
* Return 's'
158
165
159
166
When a frame is produced from the encoded data source, place it on the
160
- [[\streams ]] .readable' stream .
167
+ [[\Streams ]] .readableStream' .
161
168
162
- When a frame appears on the [[\streams ]] .writable stream , process it as if it came
169
+ When a frame appears on the [[\Streams ]] .writableStream , process it as if it came
163
170
directly from the encoded data source.
164
171
165
172
# Privacy and security considerations # {#privacy}
0 commit comments