diff --git a/index.bs b/index.bs index c830bd9..846de0e 100644 --- a/index.bs +++ b/index.bs @@ -196,7 +196,7 @@ spec: mimesniff; urlPrefix: https://mimesniff.spec.whatwg.org/#
- In the context of this specification, a MIME type is also called content - type. A valid media MIME type is a string that is a valid - MIME type per [[mimesniff]]. -
- -- Please note that the definition of MIME subtypes and parameters is - context dependent. For {{file}}, {{media-source}}, and {{record}}, the - MIME types are specified as defined for [[#http|HTTP]], whereas for - {{MediaDecodingType/webrtc}} the MIME types are specified as - defined for [[#rtp|RTP]]. -
- -
- A valid audio MIME type is a string that is a valid media
- MIME type and for which the type
per [[RFC9110]] is
- either audio
or application
.
-
- A valid video MIME type is a string that is a valid media
- MIME type and for which the type
per [[RFC9110]] is
- either video
or application
.
-
- If the MIME type does not imply a codec, the string MUST also have one
- and only one parameter that is named codecs
with a value
- describing a single media codec. Otherwise, it MUST contain no
- parameters.
-
- The MIME types used with RTP are defined in the specifications of the - corresponding RTP payload formats [[RFC4855]] [[RFC6838]]. The codec - name is typically specified as subtype and zero or more parameters - may be present depending on the codec. -
-The contentType member - represents the MIME type of the video track. + represents the [=MIME type=] of the video track.
To check if a {{VideoConfiguration}} configuration is a valid video configuration, the following steps MUST be run:
false
and
- abort these steps.
- false
and abort these steps.
@@ -326,8 +269,17 @@ spec: mimesniff; urlPrefix: https://mimesniff.spec.whatwg.org/#
{{MediaEncodingType}} to which it's not applicable, return
false
and abort these steps. See applicability rules
in the member definitions below.
+ true
.
+ Let |mimeType| be the result of running [=parse a MIME type=]
+ with |configuration|'s {{VideoConfiguration/contentType}}.
+ failure
, return false
.
+ video
.
The contentType member - represents the MIME type of the audio track. + represents the [=MIME type=] of the audio track.
- To check if a {{AudioConfiguration}} configuration is a + To check if a {{AudioConfiguration}} |configuration| is a valid audio configuration, the following steps MUST be run:
false
and
- abort these steps.
+ Let |mimeType| be the result of running [=parse a MIME type=]
+ with |configuration|'s {{AudioConfiguration/contentType}}.
true
.
+ If |mimeType| is failure
, return false
.
+ audio
.
- Given a {{MediaEncodingConfiguration}} configuration, this - algorithm returns a {{MediaCapabilitiesEncodingInfo}}. The following - steps are run: + To [$create a MediaCapabilitiesEncodingInfo$], given a + {{MediaEncodingConfiguration}} configuration, run the + following steps. They return a {{MediaCapabilitiesEncodingInfo}}:
true
. Otherwise set it to false
.
+ Let |videoSupported| be unknown
.
+ unknown
.
+ unsupported
, set {{MediaCapabilitiesInfo/supported}}
+ to false
, {{MediaCapabilitiesInfo/smooth}}
+ to false
, {{MediaCapabilitiesInfo/powerEfficient}}
+ to false
, and return info.
+ true
.
- Given a {{MediaDecodingConfiguration}} configuration, this - algorithm returns a {{MediaCapabilitiesDecodingInfo}}. The following - steps are run: + To [$create a MediaCapabilitiesDecodingInfo$], given a + {{MediaDecodingConfiguration}} |configuration|, perform the + following steps. They return a {{MediaCapabilitiesDecodingInfo}}:
null
set
- {{MediaCapabilitiesInfo/supported}} to
- true
. Otherwise set it to false
.
+ is null
, set {{MediaCapabilitiesInfo/supported}}
+ to false
, {{MediaCapabilitiesInfo/smooth}}
+ to false
, {{MediaCapabilitiesInfo/powerEfficient}}
+ to false
, and return info.
+ true
and continue with step 6.
null
.
true
.
+ Let |videoSupported| be unknown
.
+ unknown
.
+ unsupported
, set {{MediaCapabilitiesInfo/supported}}
+ to false
, {{MediaCapabilitiesInfo/smooth}}
+ to false
, {{MediaCapabilitiesInfo/powerEfficient}}
+ to false
, and return info.
false
.true
.
+ true
. Otherwise set it to false
.
true
. Otherwise set it to false
.
+ To [$check MIME type validity$] given a [=MIME type record=] |mimeType| and + a string |media|, run the following steps: +
+application
, return false
.
+ type
and subtype
members
+ of |mimeType| allow a single media codec and the
+ parameters
member of |mimeType| is not empty,
+ return false
.
+ type
and subtype
members
+ of |mimeType| allow multiple media codecs, run the following steps:
+ parameters
member of |mimeType|
+ does not contain a single key named "codecs", return
+ false
.
+
+ Issue(235): Why does it matter if a single media codec is listed?
+
+ mimeType.parameters["codecs"]
+ does not describe a single media codec, return
+ false
.
+ true
.
+ webrtc
?
+
+
+ To [$check MIME type support$], given a [=MIME type record=] |mimeType|
+ and either a {{MediaEncodingType}} or {{MediaDecodingType}}
+ |encodingOrDecodingType|, perform the following
+ steps. They return supported
if
+ the MIME type is [=supported by the user agent=], unsupported
+ if the MIME type is not supported:
+
unsupported
.
+ + The codec name is typically specified as subtype and zero or more + parameters may be present depending on the codec. +
+unsupported
.
+ supported
.
+
- Given a {{MediaDecodingConfiguration}} config where
- {{keySystemConfiguration}} [=map/exists=], this algorithm returns a
- {{MediaKeySystemAccess}} or null
as appropriate. The
- following steps are run:
+ To [$check encrypted decoding support$], given a {{MediaDecodingConfiguration}}
+ |config| where {{keySystemConfiguration}} [=map/exists=], perform the
+ following steps. They return a {{MediaKeySystemAccess}} or null
+ as appropriate:
config.keySystemConfiguration.keySystem
.
+ Let implementation be the implementation of
+ config.keySystemConfiguration.keySystem
.
config.keySystemConfiguration.sessionTypes
.
NotSupported
, return null
and abort
- these steps.
+ NotSupported
, return null
.
emeConfiguration.keySystem
.