Skip to content

Commit

Permalink
WIP: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisn committed Jul 18, 2024
1 parent 1e133e9 commit b7f3138
Showing 1 changed file with 29 additions and 34 deletions.
63 changes: 29 additions & 34 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -912,48 +912,43 @@ spec: encrypted-media-draft; for: EME; urlPrefix: https://w3c.github.io/encrypte
</li>
</ol>
<li>
Otherwise:
If |mediaType| is <code>audio</code> and |mimeType|'s [=MIME type/type=]
per [[RFC9110]] is neither <code>audio</code> nor <code>application</code>,
return <code>false</code>.
</li>
<li>
If |mediaType| is <code>video</code> and |mimeType|'s [=MIME type/type=]
per [[RFC9110]] is neither <code>video</code> nor <code>application</code>,
return <code>false</code>.
</li>
<li>
If the combined <code>type</code> and <code>subtype</code> members
of |mimeType| imply a single media codec:
<ol>
<li>
If |mediaType| is <code>audio</code> and |mimeType|'s [=MIME type/type=]
per [[RFC9110]] is neither <code>audio</code> nor <code>application</code>,
return <code>false</code>.
If the <code>parameters</code> member of |mimeType|
is not empty, return <code>failure</code>.
</li>
<li>
If |mediaType| is <code>video</code> and |mimeType|'s [=MIME type/type=]
per [[RFC9110]] is neither <code>video</code> nor <code>application</code>,
return <code>false</code>.
Return whether |mimeType| is [=supported by the user agent=].
</li>
</ol>
</li>
<li>
Otherwise:
<ol>
<li>
If the combined <code>type</code> and <code>subtype</code> members
of |mimeType| imply a single media codec:
<ol>
<li>
If the <code>parameters</code> member of |mimeType|
is not empty, return <code>failure</code>.
</li>
<li>
Return whether |mimeType| is [=supported by the user agent=].
</li>
</ol>
If the <code>parameters</code> member of |mimeType|
does not contain a single key named "codecs", return
<code>false</code>.
</li>
<li>
Otherwise:
<ol>
<li>
If the <code>parameters</code> member of |mimeType|
does not contain a single key named "codecs", return
<code>false</code>.
</li>
<li>
If the value of <code>mimeType.parameters["codecs"]</code>
does not describe a single media codec, return
<code>false</code>.
</li>
<li>
Return whether |mimeType| is [=supported by the user agent=].
</li>
</ol>
If the value of <code>mimeType.parameters["codecs"]</code>
does not describe a single media codec, return
<code>false</code>.
</li>
<li>
Return whether |mimeType| is [=supported by the user agent=].
</li>
</ol>
</li>
Expand Down

0 comments on commit b7f3138

Please sign in to comment.