Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 29 additions & 22 deletions index.src.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@
:: Refers generically to an instance of {{AudioDecoder}}, {{AudioEncoder}},
{{VideoDecoder}}, or {{VideoEncoder}}.

: <dfn lt="presentation timestamp|timestamp">presentation timestamp</dfn>
:: The presentation timestamp (PTS) of a media sample, which determines its
relative ordering and timing for rendering and processing. It is expressed
in microseconds. The specific epoch (e.g., zero-based from the start of a
capture, or matching a system clock) is not defined by this specification,
but timestamps <em class="rfc2119">SHOULD</em> be consistent within a single
stream.

: <dfn>presentation duration</dfn>
:: The duration of a media sample, expressed in microseconds.

: <dfn lt="Key Chunk|Key Frame">Key Chunk</dfn>
:: An encoded chunk that does not depend on any other frames for decoding. Also
commonly referred to as a "key frame".
Expand Down Expand Up @@ -2579,9 +2590,9 @@
: <dfn attribute for=EncodedAudioChunk>\[[type]]</dfn>
:: Describes whether the chunk is a [=key chunk=].
: <dfn attribute for=EncodedAudioChunk>\[[timestamp]]</dfn>
:: The presentation timestamp, given in microseconds.
:: The [=presentation timestamp=] of this {{EncodedAudioChunk}}.
: <dfn attribute for=EncodedAudioChunk>\[[duration]]</dfn>
:: The presentation duration, given in microseconds.
:: The [=presentation duration=] of this {{EncodedAudioChunk}}.
: <dfn attribute for=EncodedAudioChunk>[[byte length]]</dfn>
:: The byte length of {{EncodedAudioChunk/[[internal data]]}}.

Expand Down Expand Up @@ -2618,10 +2629,10 @@
:: Returns the value of {{EncodedAudioChunk/[[type]]}}.

: <dfn attribute for=EncodedAudioChunk>timestamp</dfn>
:: Returns the value of {{EncodedAudioChunk/[[timestamp]]}}.
:: Returns the [=presentation timestamp=] of this {{EncodedAudioChunk}}.

: <dfn attribute for=EncodedAudioChunk>duration</dfn>
:: Returns the value of {{EncodedAudioChunk/[[duration]]}}.
:: Returns the [=presentation duration=] of this {{EncodedAudioChunk}}.

: <dfn attribute for=EncodedAudioChunk>byteLength</dfn>
:: Returns the value of {{EncodedAudioChunk/[[byte length]]}}.
Expand Down Expand Up @@ -2685,9 +2696,9 @@
: <dfn attribute for=EncodedVideoChunk>\[[type]]</dfn>
:: The {{EncodedVideoChunkType}} of this {{EncodedVideoChunk}};
: <dfn attribute for=EncodedVideoChunk>\[[timestamp]]</dfn>
:: The presentation timestamp, given in microseconds.
:: The [=presentation timestamp=] of this {{EncodedVideoChunk}}.
: <dfn attribute for=EncodedVideoChunk>\[[duration]]</dfn>
:: The presentation duration, given in microseconds.
:: The [=presentation duration=] of this {{EncodedVideoChunk}}.
: <dfn attribute for=EncodedVideoChunk>[[byte length]]</dfn>
:: The byte length of {{EncodedVideoChunk/[[internal data]]}}.

Expand Down Expand Up @@ -2725,10 +2736,10 @@
:: Returns the value of {{EncodedVideoChunk/[[type]]}}.

: <dfn attribute for=EncodedVideoChunk>timestamp</dfn>
:: Returns the value of {{EncodedVideoChunk/[[timestamp]]}}.
:: Returns the [=presentation timestamp=] of this {{EncodedVideoChunk}}.

: <dfn attribute for=EncodedVideoChunk>duration</dfn>
:: Returns the value of {{EncodedVideoChunk/[[duration]]}}.
:: Returns the [=presentation duration=] of this {{EncodedVideoChunk}}.

: <dfn attribute for=EncodedVideoChunk>byteLength</dfn>
:: Returns the value of {{EncodedVideoChunk/[[byte length]]}}.
Expand Down Expand Up @@ -2879,7 +2890,7 @@
:: The number of audio channels for this {{AudioData}}.

: <dfn attribute for=AudioData>\[[timestamp]]</dfn>
:: The presentation timestamp, in microseconds, for this {{AudioData}}.
:: The [=presentation timestamp=] of this {{AudioData}}.

### Constructors ###{#audiodata-constructors}
<dfn constructor for=AudioData title="AudioData(init)">
Expand Down Expand Up @@ -2947,13 +2958,13 @@
{{AudioData/[[number of channels]]}}.

: <dfn attribute for=AudioData>timestamp</dfn>
:: The presentation timestamp, in microseconds, for this {{AudioData}}.
:: Returns the [=presentation timestamp=] of this {{AudioData}}.

The {{AudioData/numberOfChannels}} getter steps are to return
The {{AudioData/timestamp}} getter steps are to return
{{AudioData/[[timestamp]]}}.

: <dfn attribute for=AudioData>duration</dfn>
:: The duration, in microseconds, for this {{AudioData}}.
:: Returns the [=presentation duration=] of this {{AudioData}}.

The {{AudioData/duration}} getter steps are to:
1. Let |microsecondsPerSecond| be `1,000,000`.
Expand Down Expand Up @@ -3490,12 +3501,10 @@
adjustments.

: <dfn attribute for=VideoFrame>\[[duration]]</dfn>
:: The presentation duration, given in microseconds. The duration is copied
from the {{EncodedVideoChunk}} corresponding to this {{VideoFrame}}.
:: The [=presentation duration=] of this {{VideoFrame}}.

: <dfn attribute for=VideoFrame>\[[timestamp]]</dfn>
:: The presentation timestamp, given in microseconds. The timestamp is copied
from the {{EncodedVideoChunk}} corresponding to this {{VideoFrame}}.
:: The [=presentation timestamp=] of this {{VideoFrame}}.

: <dfn attribute for=VideoFrame>[[color space]]</dfn>
:: The {{VideoColorSpace}} associated with this frame.
Expand Down Expand Up @@ -3782,17 +3791,13 @@
{{VideoFrame/[[display height]]}}.

: <dfn attribute for=VideoFrame>timestamp</dfn>
:: The presentation timestamp, given in microseconds. For decode,
timestamp is copied from the {{EncodedVideoChunk}} corresponding
to this {{VideoFrame}}. For encode, timestamp is copied to the
{{EncodedVideoChunk}}s corresponding to this {{VideoFrame}}.
:: Returns the [=presentation timestamp=] of this {{VideoFrame}}.

The {{VideoFrame/timestamp}} getter steps are to return
{{VideoFrame/[[timestamp]]}}.

: <dfn attribute for=VideoFrame>duration</dfn>
:: The presentation duration, given in microseconds. The duration is copied
from the {{EncodedVideoChunk}} corresponding to this VideoFrame.
:: Returns the [=presentation duration=] of this {{VideoFrame}}.

The {{VideoFrame/duration}} getter steps are to return
{{VideoFrame/[[duration]]}}.
Expand Down Expand Up @@ -6261,6 +6266,7 @@
conditions, such as allowing a site to mutate a codec input or output while
the underlying codec is still operating on that data. This concern is mitigated
by ensuring that input and output interfaces are immutable.
</div>

Privacy Considerations{#privacy-considerations}
===============================================
Expand Down Expand Up @@ -6308,6 +6314,7 @@
budget", which depletes as authors use WebCodecs and other identifying APIs.
Upon exhaustion of the privacy budget, codec capabilities could be reduced to a
common baseline or prompt for user approval.
</div>

Best Practices for Authors Using WebCodecs{#best-practices-developers}
======================================================================
Expand Down
Loading