Skip to content

Commit 12e1add

Browse files
committed
Add VieoDecoder section with up-to-date interfaces
1 parent 9978d68 commit 12e1add

File tree

1 file changed

+35
-3
lines changed

1 file changed

+35
-3
lines changed

index.bs

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,40 @@ Abstract: WebCodecs is a flexible web API for encoding and decoding audio and vi
1313
!Version History: <a href="https://github.com/wicg/web-codecs/commits">https://github.com/wicg/web-codecs/commits</a>
1414
</pre>
1515

16-
<h2 id="introduction">Introduction</h2>
16+
<section class='non-normative'>
17+
<h2 id='introduction'>Introduction</h2>
18+
<em>This section is non-normative</em>
19+
<p>
20+
The introduction has not yet been written.
21+
</p>
22+
<p class='note'>
23+
NOTE: The interfaces that follow are a work in progress.
24+
</p>
25+
</section>
1726

18-
<em>This section is non-normative</em>
27+
<section>
28+
<h2 id='video-decoder-interface'>VideoDecoder Interface</h2>
29+
<pre class='idl'>
30+
[Exposed=(Window)]
31+
interface VideoDecoder {
32+
constructor();
33+
Promise&lt;void&gt; Initialize(VideoDecoderInitParameters params);
34+
Promise&lt;void&gt; Flush();
35+
void Close();
1936

20-
The specification work has not started yet.
37+
readonly attribute WritableStream writable; // of EncodedVideoFrame
38+
readonly attribute ReadableStream readable; // of VideoFrame
39+
};
40+
</pre>
41+
<pre class='idl'>
42+
[Exposed=(Window)]
43+
dictionary VideoDecoderInitParameters {
44+
required DOMString codec;
45+
required DOMString profile;
46+
47+
// These are the "coded size", not the "visible size"
48+
required unsigned long width;
49+
required unsigned long height;
50+
};
51+
</pre>
52+
</section>

0 commit comments

Comments
 (0)