Skip to content

Commit aeceff8

Browse files
authored
Merge pull request #279 from youennf/clarify-rtcencodedvideoframe-type-initialization
Align RTCEncodedVideoFrame type handling to how data is handled.
2 parents 1cfafbd + e56b05b commit aeceff8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

index.bs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -571,8 +571,8 @@ interface RTCEncodedVideoFrame {
571571
</dt>
572572
<dd>
573573
<p>
574-
The type attribute allows the application to determine when a key frame is being
575-
sent or received.
574+
The type attribute allows the application to determine when a frame is a key frame or a delta frame.
575+
On getting, |this|.`[[type]]` MUST be returned.
576576
</p>
577577
</dd>
578578
<dt>
@@ -585,6 +585,7 @@ interface RTCEncodedVideoFrame {
585585
{{RTCEncodedFrameMetadata/mimeType}}.
586586
For <a href="https://w3c.github.io/webrtc-svc/">SVC</a>, each spatial layer
587587
is transformed separately.
588+
On getting, |this|.`[[data]]` MUST be returned. On setting, |this|.`[[data]]` MUST be set to the new value.
588589
</p>
589590
<p class="note">
590591
Since packetizers may drop certain elements, e.g. AV1 temporal delimiter OBUs,
@@ -667,14 +668,14 @@ interface RTCEncodedVideoFrame {
667668
Their [=serialization steps=], given |value|, |serialized|, and |forStorage|, are:
668669

669670
1. If |forStorage| is true, then throw a {{DataCloneError}}.
670-
1. Set |serialized|.`[[type]]` to the value of |value|.{{RTCEncodedVideoFrame/type}}.
671+
1. Set |serialized|.`[[type]]` to the value of |value|.`[[type]]`.
671672
1. Set |serialized|.`[[metadata]]` to an internal representation of |value|'s metadata.
672673
1. Set |serialized|.`[[data]]` to the [=sub-serialization=] of |value|.`[[data]]`.
673674

674675

675676
Their [=deserialization steps=], given |serialized|, |value| and |realm|, are:
676677

677-
1. Set |value|.{{RTCEncodedVideoFrame/type}} to |serialized|.`[[type]]`.
678+
1. Set |value|.`[[type]]` to |serialized|.`[[type]]`.
678679
1. Set |value|'s metadata to the platform object representation of |serialized|.`[[metadata]]`.
679680
1. Set |value|.`[[data]]` to the [=sub-deserialization=] of |serialized|.`[[data]]`.
680681

@@ -783,6 +784,7 @@ interface RTCEncodedAudioFrame {
783784
The encoded frame data. The format of the data depends on the audio codec that is
784785
used to encode/decode the frame which can be determined by looking at the
785786
{{RTCEncodedFrameMetadata/mimeType}}.
787+
On getting, |this|.`[[data]]` MUST be returned. On setting, |this|.`[[data]]` MUST be set to the new value.
786788
The following table gives a number of examples:
787789
</p>
788790
<table class="simple">

0 commit comments

Comments
 (0)