diff --git a/index.bs b/index.bs index 864c093..e70ba00 100644 --- a/index.bs +++ b/index.bs @@ -264,6 +264,7 @@ The setEncryptionKey(|key|, |keyID|) met # RTCRtpScriptTransform # {#scriptTransform} +## RTCEncodedVideoFrameType dictionary ## {#RTCEncodedVideoFrameType}
 // New enum for video frame types. Will eventually re-use the equivalent defined
 // by WebCodecs.
@@ -272,7 +273,51 @@ enum RTCEncodedVideoFrameType {
     "key",
     "delta",
 };
-
+
+ + + + + + + + + + + + + + + + + + + + + +
Enumeration description
Enum valueDescription
+ empty + +

+ This frame contains no data. +

+
+ key + +

+ This frame can be decoded without reference to any other frames. +

+
+ delta + +

+ This frame references another frame and can not be decoded without that frame. +

+
+ +## RTCEncodedVideoFrameMetadata dictionary ## {#RTCEncodedVideoFrameMetadata} +
 dictionary RTCEncodedVideoFrameMetadata {
     long long frameId;
     sequence<long long> dependencies;
@@ -284,33 +329,194 @@ dictionary RTCEncodedVideoFrameMetadata {
     octet payloadType;
     sequence<unsigned long> contributingSources;
 };
+
+### Members ### {#RTCEncodedVideoFrameMetadata-members} +
+
+ synchronizationSource of type unsigned long +
+
+

+ The synchronization source (ssrc) identifier is an unsigned integer value per [[RFC3550]] + used to identify the stream of RTP packets that the encoded frame object is describing. +

+
+
+ payloadType of type octet +
+
+

+ The payload type is an unsigned integer value in the range from 0 to 127 per [[RFC3550]] + that is used to describe the format of the RTP payload. +

+
+
+ contributingSources of type sequence<unsigned long> +
+
+

+ The list of contribution sources (csrc list) as defined in [[RFC3550]]. +

+
+
+ + +## RTCEncodedVideoFrame interface ## {#RTCEncodedVideoFrame-interface} +
 // New interfaces to define encoded video and audio frames. Will eventually
 // re-use or extend the equivalent defined in WebCodecs.
 [Exposed=(Window,DedicatedWorker)]
 interface RTCEncodedVideoFrame {
     readonly attribute RTCEncodedVideoFrameType type;
-    readonly attribute unsigned long timestamp; // RTP timestamp.
+    readonly attribute unsigned long timestamp;
     attribute ArrayBuffer data;
     RTCEncodedVideoFrameMetadata getMetadata();
 };
+
+### Members ### {#RTCEncodedVideoFrame-members} +
+
+ type of type RTCEncodedVideoFrameType +
+
+

+ The type attribute allows the application to determine when a key frame is being + sent or received. +

+
+ +
+ timestamp of type unsigned long +
+
+

+ The RTP timestamp identifier is an unsigned integer value per [[RFC3550]] + that reflects the sampling instant of the first octet in the RTP data packet. +

+
+
+ data of type ArrayBuffer +
+
+

+ The encoded frame data. +

+
+
+ +### Methods ### {#RTCEncodedVideoFrame-methods} +
+
+ getMetadata() +
+
+

+ Returns the metadata associated with the frame. +

+
+
+ +## RTCEncodedAudioFrameMetadata dictionary ## {#RTCEncodedAudioFrameMetadata} +
 dictionary RTCEncodedAudioFrameMetadata {
     unsigned long synchronizationSource;
     octet payloadType;
     sequence<unsigned long> contributingSources;
 };
-
+
+### Members ### {#RTCEncodedAudioFrameMetadata-members} +
+
+ synchronizationSource of type unsigned long +
+
+

+ The synchronization source (ssrc) identifier is an unsigned integer value per [[RFC3550]] + used to identify the stream of RTP packets that the encoded frame object is describing. +

+
+
+ payloadType of type octet +
+
+

+ The payload type is an unsigned integer value in the range from 0 to 127 per [[RFC3550]] + that is used to describe the format of the RTP payload. +

+
+
+ contributingSources of type sequence<unsigned long> +
+
+

+ The list of contribution sources (csrc list) as defined in [[RFC3550]]. +

+
+
+ +## RTCEncodedAudioFrame interface ## {#RTCEncodedAudioFrame-interface} +
 [Exposed=(Window,DedicatedWorker)]
 interface RTCEncodedAudioFrame {
-    readonly attribute unsigned long timestamp; // RTP timestamp.
+    readonly attribute unsigned long timestamp;
     attribute ArrayBuffer data;
     RTCEncodedAudioFrameMetadata getMetadata();
 };
+
+### Members ### {#RTCEncodedAudioFrame-members} +
+
+ timestamp of type unsigned long +
+
+

+ The RTP timestamp identifier is an unsigned integer value per [[RFC3550]] + that reflects the sampling instant of the first octet in the RTP data packet. +

+
+
+ data of type ArrayBuffer +
+
+

+ The encoded frame data. +

+
+
+ +### Methods ### {#RTCEncodedAudioFrame-methods} +
+
+ getMetadata() +
+
+

+ Returns the metadata associated with the frame. +

+
+
-// New interfaces to expose JavaScript-based transforms. +// New interfaces to expose JavaScript-based transforms. +##Interfaces +
 [Exposed=DedicatedWorker]
 interface RTCTransformEvent : Event {
     readonly attribute RTCRtpScriptTransformer transformer;
@@ -415,7 +621,7 @@ The generate key frame algorithm, given |promise|, |encoder| and |rid
 For any {{RTCRtpScriptTransformer}} named |transformer|, the following steps are run just before any |frame| is enqueued in |transformer|.`[[readable]]`:
 1. Let |encoder| be |transformer|.`[[encoder]]`.
 1. If |encoder| or |encoder|.`[[pendingKeyFrameTasks]]` is undefined, abort these steps.
-1. If |frame| is not a video key frame, abort these steps.
+1. If |frame| is not a video {{RTCEncodedVideoFrameType/"key"}} frame, abort these steps.
 1. For each |task| in |encoder|.`[[pendingKeyFrameTasks]]`, run the following steps:
     1. If |frame| was generated by a video encoder identified by |task|.`[[rid]]`, run the following steps:
         1. Remove |task| from |encoder|.`[[pendingKeyFrameTasks]]`.