Skip to content

Commit 9e6be0f

Browse files
authored
Merge branch 'master' into webrtc-insertable-streams
2 parents 7723761 + b8b49eb commit 9e6be0f

File tree

2 files changed

+91
-6
lines changed

2 files changed

+91
-6
lines changed

index.bs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ Similarly, if a web application sets the transform synchronously at creation of
219219

220220
# SFrameTransform # {#sframe}
221221

222-
<pre class="idl">
222+
<xmp class="idl">
223223
enum SFrameTransformRole {
224224
"encrypt",
225225
"decrypt"
@@ -232,10 +232,10 @@ dictionary SFrameTransformOptions {
232232
[Exposed=(Window,DedicatedWorker)]
233233
interface SFrameTransform {
234234
constructor(optional SFrameTransformOptions options = {});
235-
// FIXME: add key handling methods.
235+
Promise<undefined> setEncryptionKey(CryptoKey key, optional unsigned long long keyID);
236236
};
237237
SFrameTransform includes GenericTransformStream;
238-
</pre>
238+
</xmp>
239239

240240
The <dfn constructor for="SFrameTransform" lt="SFrameTransform(options)"><code>new SFrameTransform(<var>options</var>)</code></dfn> constructor steps are:
241241
1. Let |transformAlgorithm| be an algorithm which takes a |frame| as input and runs the <a href="#sframe-transform-algorithm">SFrame transform algorithm</a> with |this| and |frame|.
@@ -262,6 +262,15 @@ The SFrame transform algorithm, given |sframe| as a SFrameTransform object and |
262262
12. If |frame| is an {{RTCEncodedVideoFrame}}, set |frame|.{{RTCEncodedVideoFrame/data}} to |buffer|.
263263
13. [=ReadableStream/Enqueue=] |frame| in |sframe|.`[[transform]]`.
264264

265+
## Methods
266+
The <dfn method for="SFrameTransform">setEncryptionKey(|key|, |keyID|)</dfn> method steps are:
267+
1. Let |promise| be [=a new promise=].
268+
2. [=In parallel=], run the following steps:
269+
1. Set |key| with its optional |keyID| as key material to use for the SFrame transform algorithm, as defined by the <a href="https://datatracker.ietf.org/doc/draft-omara-sframe/">SFrame specification</a>.
270+
2. [=Resolve=] |promise| with undefined.
271+
3. Return |promise|.
272+
273+
265274
# RTCRtpScriptTransform # {#scriptTransform}
266275

267276
<pre class="idl">

0 commit comments

Comments
 (0)