Skip to content

Commit 14d3063

Browse files
committed
Introduce sender and receiver transforms
1 parent 40722c4 commit 14d3063

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

index.bs

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,16 @@ It uses an additional API on {{RTCRtpSender}} and {{RTCRtpReceiver}} to
8181
insert the processing into the pipeline.
8282

8383
<pre class="idl">
84-
typedef (SFrameTransform or RTCRtpScriptTransform) RTCRtpTransform;
84+
typedef (SFrameSenderTransform or RTCRtpScriptTransform) RTCRtpSenderTransform;
85+
typedef (SFrameReceiverTransform or RTCRtpScriptTransform) RTCRtpReceierTransform;
8586

8687
// New methods for RTCRtpSender and RTCRtpReceiver
8788
partial interface RTCRtpSender {
88-
attribute RTCRtpTransform? transform;
89+
attribute RTCRtpSenderTransform? transform;
8990
};
9091

9192
partial interface RTCRtpReceiver {
92-
attribute RTCRtpTransform? transform;
93+
attribute RTCRtpReceiverTransform? transform;
9394
};
9495
</pre>
9596

@@ -214,7 +215,7 @@ There is no guarantee on which frame will happen the switch from the previous tr
214215
If a web application sets the transform synchronously at creation of the {{RTCRtpSender}} (for instance when calling addTrack), the transform will receive the first frame generated by the {{RTCRtpSender}}'s encoder.
215216
Similarly, if a web application sets the transform synchronously at creation of the {{RTCRtpReceiver}} (for instance when calling addTrack, or at track event handler), the transform will receive the first full frame generated by the {{RTCRtpReceiver}}'s packetizer.
216217

217-
# SFrameTransform # {#sframe}
218+
# SFrame transforms # {#sframe}
218219

219220
<p>
220221
The APIs presented in this section allow applications to process SFrame data using specific cipher suites defined in [[RFC9605]].
@@ -249,10 +250,16 @@ interface mixin SFrameDecrypterManagement {
249250
};
250251

251252
[Exposed=Window]
252-
interface SFrameTransform : EventTarget {
253+
interface SFrameSenderTransform {
253254
constructor(optional SFrameTransformOptions options = {});
254255
};
255-
SFrameTransform includes SFrameKeyManagement;
256+
SFrameSenderTransform includes SFrameEncrypterKeyManagement;
257+
258+
[Exposed=Window]
259+
interface SFrameReceiverTransform : EventTarget {
260+
constructor(optional SFrameTransformOptions options = {});
261+
};
262+
SFrameReceiverTransform includes SFrameDecrypterKeyManagement;
256263

257264
[Exposed=(Window,DedicatedWorker)]
258265
interface SFrameEncrypterStream : EventTarget {
@@ -290,9 +297,15 @@ dictionary SFrameTransformErrorEventInit : EventInit {
290297
};
291298
</xmp>
292299

293-
The <dfn constructor for="SFrameTransform" lt="SFrameTransform(options)"><code>new SFrameTransform(<var>options</var>)</code></dfn> constructor steps are:
300+
The <dfn constructor for="SFrameSenderTransform" lt="SFrameSenderTransform(options)"><code>new SFrameSenderTransform(<var>options</var>)</code></dfn> constructor steps are:
294301
1. Let |options| be the method's first argument.
295302
1. Run the [=SFrame initialization algorithm=] with |this| and |options|.
303+
1. Set |this|.`[[role]]` to 'encrypt'.
304+
305+
The <dfn constructor for="SFrameReceiverTransform" lt="SFrameReceiverTransform(options)"><code>new SFrameReceiverTransform(<var>options</var>)</code></dfn> constructor steps are:
306+
1. Let |options| be the method's first argument.
307+
1. Run the [=SFrame initialization algorithm=] with |this| and |options|.
308+
1. Set |this|.`[[role]]` to 'decrypt'.
296309

297310
The <dfn constructor for="SFrameEncrypterStream" lt="SFrameEncrypterStream(options)"><code>new SFrameEncrypterStream(<var>options</var>)</code></dfn> constructor steps are:
298311
1. Let |options| be the method's first argument.

0 commit comments

Comments
 (0)