diff --git a/index.bs b/index.bs index c830bd9..2234390 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,6 +269,23 @@ 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.
+ failure
, return false
and abort these steps.
+ video
nor
+ application
, return false
and abort these steps.
+ true
.
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}}.
+ failure
, return false
and abort these steps.
+ audio
nor
+ application
, return false
and abort these steps.
+ true
.
@@ -782,14 +753,12 @@ spec: mimesniff; urlPrefix: https://mimesniff.spec.whatwg.org/#
- 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
.
+ If {{MediaConfiguration/video}} is present in
+ |configuration|, let |videoMimeSupport| be the result of running
+ [$Check MIME Type Support$] with
+ {{VideoConfiguration/[[mimeType]]}}, the |media| video, and
+ |configuration|'s {{MediaEncodingConfiguration/type}}, otherwise
+ let |videoMimeSupport| be undefined
.
+ undefined
.
+ 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
.
true
.
+ If {{MediaConfiguration/video}} is present in |configuration|,
+ let |videoMimeSupport| be the result of running [$Check MIME Type
+ Support$] with its {{VideoConfiguration/[[mimeType]]}},
+ the |media| video, and |configuration|'s
+ {{MediaDecodingConfiguration/type}}, otherwise let |videoMimeSupport|
+ be undefined
.
+ undefined
.
+ 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 support$], given a [=MIME type record=] |mimeType|,
+ a string |media|, 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:
+
+ If |mimeType| is not one that is used with RTP, as defined in the
+ specifications of the corresponding RTP payload formats
+ [[IANA-MEDIA-TYPES]] [[RFC6838]], return unsupported
.
+
+ The codec name is typically specified as subtype and zero or more + parameters may be present depending on the codec. +
+unsupported
.
+ supported
.
+ audio
and |mimeType|'s [=MIME type/type=]
+ is neither audio
nor application
,
+ return unsupported
.
+ video
and |mimeType|'s [=MIME type/type=]
+ is neither video
nor application
,
+ return unsupported
.
+ type
and subtype
members
+ of |mimeType| imply a single media codec:
+ parameters
member of |mimeType|
+ is not empty, return failure
.
+ unsupported
.
+ supported
.
+ parameters
member of |mimeType|
+ does not contain a single key named "codecs", return
+ unsupported
.
+ mimeType.parameters["codecs"]
+ does not describe a single media codec, return
+ unsupported
.
+ 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
.