Skip to content

Commit 64a18b1

Browse files
committed
Align RTCEncodedVideoFrame type handling to how data is handled.
We use a [[type]] slot and set it in constructor, as well as deserialization steps. We make it clear that data/type attributes are related to [[type]]/[[data]] slots.
1 parent 9cf200f commit 64a18b1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.bs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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)