Bug 1842773 - Part 5: Add ArrayBuffer.prototype.{maxByteLength,resizable} getters...
[gecko.git] / dom / webidl / RTCEncodedVideoFrame.webidl
blob564252fd6ed066af468e6c4076aabf9412980ada
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/.
5  *
6  * The origin of this IDL file is
7  * https://www.w3.org/TR/webrtc-encoded-transform
8  */
10 // New enum for video frame types. Will eventually re-use the equivalent defined
11 // by WebCodecs.
12 enum RTCEncodedVideoFrameType {
13     "empty",
14     "key",
15     "delta",
18 dictionary RTCEncodedVideoFrameMetadata {
19     unsigned long long frameId;
20     sequence<unsigned long long> dependencies;
21     unsigned short width;
22     unsigned short height;
23     unsigned long spatialIndex;
24     unsigned long temporalIndex;
25     unsigned long synchronizationSource;
26     octet payloadType;
27     sequence<unsigned long> contributingSources;
28     long long timestamp;    // microseconds
31 // New interfaces to define encoded video and audio frames. Will eventually
32 // re-use or extend the equivalent defined in WebCodecs.
33 [Pref="media.peerconnection.enabled",
34  Pref="media.peerconnection.scripttransform.enabled",
35  Exposed=(Window,DedicatedWorker)]
36 interface RTCEncodedVideoFrame {
37     readonly attribute RTCEncodedVideoFrameType type;
38     readonly attribute unsigned long timestamp;
39     attribute ArrayBuffer data;
40     RTCEncodedVideoFrameMetadata getMetadata();