From 3102bacd42d8bf24f124a1ba243649b5845cc4c1 Mon Sep 17 00:00:00 2001 From: Chris Cunningham Date: Sun, 21 Feb 2021 21:30:44 -0800 Subject: [PATCH 1/5] Define MediaCapabilitiesDecodingInfo.codecSwitchingSupported --- index.bs | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/index.bs b/index.bs index af151ce..e6b2290 100644 --- a/index.bs +++ b/index.bs @@ -28,6 +28,12 @@ spec: media-source; urlPrefix: https://www.w3.org/TR/media-source/ type: method for: MediaSource; text: isTypeSupported(); url: #dom-mediasource-istypesupported +spec: media-source-codec-switching; urlPrefix: https://rawgit.com/wicg/media-source/codec-switching/index.html + type: interface + for: SourceBuffer; text: SourceBuffer; url: #sourcebuffer + type: method + for: SourceBuffer; text: changeType(); url: #dom-sourcebuffer-changetype + spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/; type: method for: HTMLMediaElement; text: canPlayType(); url: #dom-navigator-canplaytype @@ -94,6 +100,8 @@ spec: encrypted-media; for: EME; urlPrefix: https://www.w3.org/TR/encrypted-medi text: MediaKeysRequirement; url: dom-mediakeysrequirement text: audioCapabilities; url: dom-mediakeysystemconfiguration-audiocapabilities text: contentType; url: dom-mediakeysystemmediacapability-contenttype + type: method + text: setMediaKeys(); url: dom-htmlmediaelement-setmediakeys spec: encrypted-media-draft; for: EME; urlPrefix: https://w3c.github.io/encrypted-media/# type: attribute @@ -180,6 +188,21 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/

+
+

Definitions

+
+
Decoding Pipeline
+
+ A configuration of inernal user agent components that implement media + decoding. For the purposes of this specification, we concieve of user + agents having distinct pipelines for encrypted vs unencrypted media. + Moreover, user agents may support more a number of distinct encrypted + media pipelines, which must be signalled by using different + {{MediaCapabilitiesKeySystemConfiguration/keySystem}} names. +
+
+
+

Decoding and Encoding Capabilities

@@ -766,6 +789,7 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
       dictionary MediaCapabilitiesDecodingInfo : MediaCapabilitiesInfo {
+        required boolean codecSwitchingSupported;
         required MediaKeySystemAccess keySystemAccess;
         MediaDecodingConfiguration configuration;
       };
@@ -794,6 +818,20 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
       temperature or the fans noise.
     

+

+ A {{MediaCapabilitiesDecodingInfo}} has an associated + + codecSwitchingSupported which is a boolean. +

+ +

+ Authors can use {{MediaCapabilitiesDecodingInfo/codecSwitchingSupported}} + to determine whether the user agent supports codec switching via + {{SourceBuffer/changeType()}} within the described + decoding pipeline. Note that switching between + decoding pipelines is a separate quality of implementation issue as desribed by {{EME/setMediaKeys()}}. +

+

A {{MediaCapabilitiesDecodingInfo}} has associated keySystemAccess @@ -940,6 +978,21 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/ efficiency unless the device's power source has side effects such as enabling different decoding modules. +

  • + If configuration.type is set to {{MediaDecodingType/media-source}}: +
      +
    1. + Let pipeline be the decoding pipeline + described by configuration. +
    2. +
    3. + If pipeline is able to support dynamic codec + switching via {{SourceBuffer}} {{SourceBuffer/changeType()}}, + set {{MediaCapabilitiesDecodingInfo/codecSwitchingSupported}} + to true. Otherwise, set it to false. +
    4. +
    +
  • Return info.
  • From 28b8ac6461166cbfa120b16c0c4aaada286de491 Mon Sep 17 00:00:00 2001 From: Chris Cunningham Date: Sun, 21 Feb 2021 22:30:18 -0800 Subject: [PATCH 2/5] Minor dfn re-wording --- index.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index e6b2290..9f55a88 100644 --- a/index.bs +++ b/index.bs @@ -196,8 +196,8 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/ A configuration of inernal user agent components that implement media decoding. For the purposes of this specification, we concieve of user agents having distinct pipelines for encrypted vs unencrypted media. - Moreover, user agents may support more a number of distinct encrypted - media pipelines, which must be signalled by using different + Additionally, user agents may support several distinct encrypted media + pipelines, which must be signalled by using different {{MediaCapabilitiesKeySystemConfiguration/keySystem}} names. From c88c9f86a40e5dd843d8e386be8b4c4fc84b5851 Mon Sep 17 00:00:00 2001 From: Chris Cunningham Date: Mon, 22 Feb 2021 16:09:17 -0800 Subject: [PATCH 3/5] Xhwang Feedback --- index.bs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/index.bs b/index.bs index 9f55a88..35e737c 100644 --- a/index.bs +++ b/index.bs @@ -198,7 +198,8 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/ agents having distinct pipelines for encrypted vs unencrypted media. Additionally, user agents may support several distinct encrypted media pipelines, which must be signalled by using different - {{MediaCapabilitiesKeySystemConfiguration/keySystem}} names. + {{MediaCapabilitiesKeySystemConfiguration/keySystem}} names or different + {{KeySystemTrackConfiguration/robustness}} levels.
    @@ -979,16 +980,18 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/ such as enabling different decoding modules.
  • - If configuration.type is set to {{MediaDecodingType/media-source}}: + If configuration.type is set to + {{MediaDecodingType/media-source}}:
    1. Let pipeline be the decoding pipeline described by configuration.
    2. - If pipeline is able to support dynamic codec - switching via {{SourceBuffer}} {{SourceBuffer/changeType()}}, - set {{MediaCapabilitiesDecodingInfo/codecSwitchingSupported}} + If pipeline is able to support using + {{SourceBuffer}} {{SourceBuffer/changeType()}} to switch + between any and all of its supported codecs, set + {{MediaCapabilitiesDecodingInfo/codecSwitchingSupported}} to true. Otherwise, set it to false.
    From 1433459db3f435997fbc61d2b3f17d65286dde4e Mon Sep 17 00:00:00 2001 From: Chris Needham Date: Fri, 24 Nov 2023 15:04:27 +0000 Subject: [PATCH 4/5] Fixed typos --- index.bs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/index.bs b/index.bs index 35e737c..d0ea826 100644 --- a/index.bs +++ b/index.bs @@ -193,8 +193,8 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/
    Decoding Pipeline
    - A configuration of inernal user agent components that implement media - decoding. For the purposes of this specification, we concieve of user + A configuration of internal user agent components that implement media + decoding. For the purposes of this specification, we conceive of user agents having distinct pipelines for encrypted vs unencrypted media. Additionally, user agents may support several distinct encrypted media pipelines, which must be signalled by using different @@ -830,7 +830,8 @@ spec: secure-contexts; urlPrefix: https://www.w3.org/TR/secure-contexts/ to determine whether the user agent supports codec switching via {{SourceBuffer/changeType()}} within the described decoding pipeline. Note that switching between - decoding pipelines is a separate quality of implementation issue as desribed by {{EME/setMediaKeys()}}. + decoding pipelines is a separate quality of implementation issue + as described by {{EME/setMediaKeys()}}.

    From 31b912e39ae09ba42cee660c59baacdc9c97b13f Mon Sep 17 00:00:00 2001 From: Chris Needham Date: Tue, 9 Jan 2024 11:48:05 +0000 Subject: [PATCH 5/5] Updated references to definitions in MSE spec --- index.bs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/index.bs b/index.bs index d0ea826..c1e0099 100644 --- a/index.bs +++ b/index.bs @@ -22,18 +22,12 @@ Abstract: based on the device's display.

    -spec: media-source; urlPrefix: https://www.w3.org/TR/media-source/
    +spec: media-source-2; urlPrefix: https://www.w3.org/TR/media-source-2/
         type: interface
             for: MediaSource; text: MediaSource; url: #mediasource
         type: method
             for: MediaSource; text: isTypeSupported(); url: #dom-mediasource-istypesupported
     
    -spec: media-source-codec-switching; urlPrefix: https://rawgit.com/wicg/media-source/codec-switching/index.html
    -    type: interface
    -        for: SourceBuffer; text: SourceBuffer; url: #sourcebuffer
    -    type: method
    -        for: SourceBuffer; text: changeType(); url: #dom-sourcebuffer-changetype
    -
     spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/;
         type: method
             for: HTMLMediaElement; text: canPlayType(); url: #dom-navigator-canplaytype