diff --git a/index.src.html b/index.src.html index 9ac836e9..d48f2c8e 100644 --- a/index.src.html +++ b/index.src.html @@ -1784,7 +1784,9 @@ constructor(EncodedAudioChunkInit init); readonly attribute EncodedAudioChunkType type; readonly attribute unsigned long long timestamp; // microseconds - readonly attribute ArrayBuffer data; + readonly attribute unsigned long byteLength; + + undefined copyTo(ArrayBufferView dst); }; dictionary EncodedAudioChunkInit { @@ -1799,27 +1801,38 @@ }; +### Internal Slots ### {#encodedaudiochunk-internal-slots} +: [[internal data]] +:: An array of bytes representing the encoded chunk data. + ### Constructors ###{#encodedaudiochunk-constructors} EncodedAudioChunk(init) 1. Let |chunk| be a new {{EncodedAudioChunk}} object, initialized as follows - 1. Assign `init.type` to `chunk.type`. - 2. Assign `init.timestamp` to `chunk.timestamp`. - 3. Assign a copy of `init.data` to `chunk.data`. + 1. Assign `init.type` to {{EncodedAudioChunk/type}}. + 2. Assign `init.timestamp` to {{EncodedAudioChunk/timestamp}}. + 3. Assign a copy of `init.data` to {{EncodedAudioChunk/[[internal data]]}}. + 4. Assign `init.data.byteLength` to {{EncodedAudioChunk/byteLength}}; 5. Return |chunk|. ### Attributes ###{#encodedaudiochunk-attributes} -
-
type
-
Describes whether the chunk is a key frame.
+: type +:: Describes whether the chunk is a key frame. -
timestamp
-
The presentation timestamp, given in microseconds.
+: timestamp +:: The presentation timestamp, given in microseconds. -
data
-
A sequence of bytes containing encoded audio data.
-
+: byteLength +:: The byte length of {{EncodedAudioChunk/[[internal data]]}}. + +### Methods ###{#encodedaudiochunk-methods} +: copyTo(dst) +:: When invoked, run these steps: + 1. If {{EncodedAudioChunk/byteLength}} is greater than + |dst|.`byteLength`, + throw a {{TypeError}}. + 2. Copy the {{EncodedAudioChunk/[[internal data]]}} into |dst|. EncodedVideoChunk Interface{#encodedvideochunk-interface} ----------------------------------------------------------- @@ -1830,7 +1843,9 @@ readonly attribute EncodedVideoChunkType type; readonly attribute unsigned long long timestamp; // microseconds readonly attribute unsigned long long? duration; // microseconds - readonly attribute ArrayBuffer data; + readonly attribute unsigned long byteLength; + + undefined copyTo(ArrayBufferView dst); }; dictionary EncodedVideoChunkInit { @@ -1846,32 +1861,44 @@ }; +### Internal Slots ### {#encodedvideochunk-internal-slots} +: [[internal data]] +:: An array of bytes representing the encoded chunk data. + ### Constructors ###{#encodedvideochunk-constructors} EncodedVideoChunk(init) 1. Let |chunk| be a new {{EncodedVideoChunk}} object, initialized as follows - 1. Assign `init.type` to `chunk.type`. - 2. Assign `init.timestamp` to `chunk.timestamp`. + 1. Assign `init.type` to {{EncodedVideoChunk/type}}. + 2. Assign `init.timestamp` to {{EncodedVideoChunk/timestamp}}. 3. If duration is present in init, assign `init.duration` to - `chunk.duration`. Otherwise, assign null to `chunk.duration`. -2. Assign a copy of `init.data` to `chunk.data`. + {{EncodedVideoChunk/duration}}. Otherwise, assign `null` to + {{EncodedVideoChunk/duration}}. + 4. Assign a copy of `init.data` to {{EncodedVideoChunk/[[internal data]]}}. + 5. Assign `init.data.byteLength` to {{EncodedVideoChunk/byteLength}}; 3. Return |chunk|. ### Attributes ###{#encodedvideochunk-attributes} -
-
type
-
Describes whether the chunk is a key frame or not.
+: type +:: Describes whether the chunk is a key frame or not. -
timestamp
-
The presentation timestamp, given in microseconds.
+: timestamp +:: The presentation timestamp, given in microseconds. -
duration
-
The presentation duration, given in microseconds.
+: duration +:: The presentation duration, given in microseconds. -
data
-
A sequence of bytes containing encoded video data.
-
+: byteLength +:: The byte length of {{EncodedVideoChunk/[[internal data]]}}. + +### Methods ###{#encodedvideochunk-methods} +: copyTo(dst) +:: When invoked, run these steps: + 1. If {{EncodedVideoChunk/byteLength}} is greater than + |dst|.`byteLength`, + throw a {{TypeError}}. + 2. Copy the {{EncodedVideoChunk/[[internal data]]}} into |dst|. Raw Media Interfaces {#raw-media-interfaces} @@ -3530,9 +3557,6 @@ This concern is mitigated by ensuring that input and output interfaces are immutable. -ISSUE: EncodedVideoChunk and EncodedAudioChunk currently expose a mutable -data. See #80. - Privacy Considerations{#privacy-considerations} =============================================== The primary privacy impact is an increased ability to fingerprint users by