Skip to content

Commit 55cf43a

Browse files
authored
Merge pull request #193 from drkron/type_error
Specify in which contexts optional members are applicable
2 parents 5d282a4 + 22f5c1c commit 55cf43a

File tree

1 file changed

+29
-8
lines changed

1 file changed

+29
-8
lines changed

index.bs

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
243243
<li>
244244
If <code>keySystemConfiguration</code> [=map/exists=]:
245245
<ol>
246+
<li>
247+
The <code>type</code> MUST be {{media-source}} or {{file}}.
248+
</li>
246249
<li>
247250
If <code>keySystemConfiguration.audio</code> [=map/exists=],
248251
<code>audio</code> MUST also [=map/exist=].
@@ -402,6 +405,11 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
402405
If {{VideoConfiguration/framerate}} is not finite or is not greater
403406
than 0, return <code>false</code> and abort these steps.
404407
</li>
408+
<li>
409+
If an optional member is specified for a {{MediaDecodingType}} or
410+
{{MediaEncodingType}} to which it's not applicable, return
411+
<code>false</code> and abort these steps. See applicability rules
412+
in the member definitions below.
405413
<li>
406414
Return <code>true</code>.
407415
</li>
@@ -449,7 +457,9 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
449457
member represents that the video track includes the specified HDR
450458
metadata type, which the UA needs to be capable of interpreting for tone
451459
mapping the HDR content to a color volume and luminance of the output
452-
device. Valid inputs are defined by {{HdrMetadataType}}.
460+
device. Valid inputs are defined by {{HdrMetadataType}}. hdrMetadataType is
461+
only applicable to {{MediaDecodingConfiguration}} for types {{media-source}}
462+
and {{file}}.
453463
</p>
454464

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

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

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

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

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

639653
<p>
640654
The <dfn for='AudioConfiguration' dict-member>channels</dfn> member
641-
represents the audio channels used by the audio track.
655+
represents the audio channels used by the audio track. channels is only
656+
applicable to the decoding types {{media-source}}, {{file}}, and
657+
{{MediaDecodingType/webrtc}} and the encoding type
658+
{{MediaEncodingType/webrtc}}.
642659
</p>
643660

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

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

0 commit comments

Comments
 (0)