Skip to content

Commit

Permalink
Merge pull request #193 from drkron/type_error
Browse files Browse the repository at this point in the history
Specify in which contexts optional members are applicable
  • Loading branch information
chcunningham authored Apr 19, 2022
2 parents 5d282a4 + 22f5c1c commit 55cf43a
Showing 1 changed file with 29 additions and 8 deletions.
37 changes: 29 additions & 8 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
<li>
If <code>keySystemConfiguration</code> [=map/exists=]:
<ol>
<li>
The <code>type</code> MUST be {{media-source}} or {{file}}.
</li>
<li>
If <code>keySystemConfiguration.audio</code> [=map/exists=],
<code>audio</code> MUST also [=map/exist=].
Expand Down Expand Up @@ -402,6 +405,11 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
If {{VideoConfiguration/framerate}} is not finite or is not greater
than 0, return <code>false</code> and abort these steps.
</li>
<li>
If an optional member is specified for a {{MediaDecodingType}} or
{{MediaEncodingType}} to which it's not applicable, return
<code>false</code> and abort these steps. See applicability rules
in the member definitions below.
<li>
Return <code>true</code>.
</li>
Expand Down Expand Up @@ -449,7 +457,9 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
member represents that the video track includes the specified HDR
metadata type, which the UA needs to be capable of interpreting for tone
mapping the HDR content to a color volume and luminance of the output
device. Valid inputs are defined by {{HdrMetadataType}}.
device. Valid inputs are defined by {{HdrMetadataType}}. hdrMetadataType is
only applicable to {{MediaDecodingConfiguration}} for types {{media-source}}
and {{file}}.
</p>

<p>
Expand All @@ -461,7 +471,9 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
to render the appropriate color, or something close enough. If the
attached output device does not support the specified color, the UA
needs to be capable of mapping the specified color to a color supported
by the output device. Valid inputs are defined by {{ColorGamut}}.
by the output device. Valid inputs are defined by {{ColorGamut}}. colorGamut
is only applicable to {{MediaDecodingConfiguration}} for types
{{media-source}} and {{file}}.
</p>

<p>
Expand All @@ -471,7 +483,8 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
electro-optical algorithm supported by the rendering capabilities of a
user agent, independent of the display, to map the source colors in the
decoded media into the colors to be displayed. Valid inputs are defined
by {{TransferFunction}}.
by {{TransferFunction}}. transferFunction is only applicable to
{{MediaDecodingConfiguration}} for types {{media-source}} and {{file}}.
</p>

<p>
Expand All @@ -480,7 +493,7 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
absent, the implementer defined default mode for this {{contentType}} is
assumed (i.e., the mode you get if you don't specify one via
{{RTCRtpSender/setParameters()}}). scalabilityMode is only applicable
to the {{MediaEncodingType}} {{MediaEncodingType/webrtc}}.
to {{MediaEncodingConfiguration}} for type {{MediaEncodingType/webrtc}}.
</p>

<p>
Expand All @@ -492,7 +505,8 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
{{scalabilityMode}} in the sense that streams encoded with modes using
spatial scalability (e.g. "L2T1") can only be decoded if
spatialScalability is supported. spatialScalability is only applicable
to {{MediaDecodingConfiguration}}.
to {{MediaDecodingConfiguration}} for types {{media-source}}, {{file}},
and {{MediaDecodingType/webrtc}}.
</p>
</section>

Expand Down Expand Up @@ -638,7 +652,10 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/

<p>
The <dfn for='AudioConfiguration' dict-member>channels</dfn> member
represents the audio channels used by the audio track.
represents the audio channels used by the audio track. channels is only
applicable to the decoding types {{media-source}}, {{file}}, and
{{MediaDecodingType/webrtc}} and the encoding type
{{MediaEncodingType/webrtc}}.
</p>

<p class='issue'>
Expand All @@ -657,7 +674,10 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
<p>
The <dfn for='AudioConfiguration' dict-member>samplerate</dfn>
represents the samplerate of the audio track in. The samplerate is the
number of samples of audio carried per second.
number of samples of audio carried per second. samplerate is only
applicable to the decoding types {{media-source}}, {{file}}, and
{{MediaDecodingType/webrtc}} and the encoding type
{{MediaEncodingType/webrtc}}.
</p>

<p class='note'>
Expand All @@ -677,7 +697,8 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
the user agent SHOULD only report this configuration as
{{MediaCapabilitiesInfo/supported}} if it can support spatial
rendering *for the current audio output device* without failing back to a
non-spatial mix of the stream.
non-spatial mix of the stream. spatialRendering is only applicable to
{{MediaDecodingConfiguration}} for types {{media-source}} and {{file}}.
</p>
</section>
</section>
Expand Down

0 comments on commit 55cf43a

Please sign in to comment.