From 2e39d54351512dbeb27af632f56f16d9474c9b62 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Wed, 13 Dec 2023 13:48:59 -0800 Subject: [PATCH 01/48] Update index.bs with ChapterInformation --- index.bs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/index.bs b/index.bs index 469078d..4f3182e 100644 --- a/index.bs +++ b/index.bs @@ -940,6 +940,7 @@ interface MediaMetadata { attribute DOMString artist; attribute DOMString album; attribute FrozenArray<MediaImage> artwork; + attribute FrozenArray chapterInfo; }; dictionary MediaMetadataInit { @@ -947,6 +948,13 @@ dictionary MediaMetadataInit { DOMString artist = ""; DOMString album = ""; sequence<MediaImage> artwork = []; + sequence chapterInfo = []; +}; + +dictionary ChapterInformation { + DOMString title = ""; + double startTime = ""; + attribute FrozenArray artwork; }; From 40b60306458f6795f774b4244f47ed3f5cfcc11a Mon Sep 17 00:00:00 2001 From: jiamingc Date: Thu, 14 Dec 2023 14:37:46 -0800 Subject: [PATCH 02/48] Update index.bs --- index.bs | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/index.bs b/index.bs index 4f3182e..c7792d2 100644 --- a/index.bs +++ b/index.bs @@ -950,12 +950,6 @@ dictionary MediaMetadataInit { sequence<MediaImage> artwork = []; sequence chapterInfo = []; }; - -dictionary ChapterInformation { - DOMString title = ""; - double startTime = ""; - attribute FrozenArray artwork; -};

@@ -980,6 +974,11 @@ dictionary ChapterInformation { images.

+

+ A {{MediaMetadata}} has an associated list of + chapter information. +

+

A {{MediaMetadata}} is said to be an empty metadata if it is equal to null or all the following conditions are true: @@ -989,6 +988,8 @@ dictionary ChapterInformation {

  • Its album is the empty string.
  • Its artwork images length is 0.
  • +
  • Its chapter information length + is 0.
  • @@ -1019,6 +1020,10 @@ dictionary ChapterInformation { metadata's artwork images as the result if it succeeded. +
  • + Set metadata's {{MediaMetadata/chapterInfo}} to + init's {{MediaMetadataInit/chapterInfo}}. +
  • Return metadata.
  • @@ -1165,6 +1170,28 @@ invoked, the user agent MUST run the following steps:

    +

    The {{ChapterInformation}} dictionary

    + +
    +
    +dictionary ChapterInformation {
    +  DOMString title = "";
    +  double startTime = "";
    +  attribute FrozenArray artwork;
    +};
    +
    + +The title dictionary member is +used to specify the {{ChapterInformation}} object's {{MediaImage/title}}. + +The startTime dictionary member +is used to specify the {{ChapterInformation}} object's {{MediaImage/startTime}} in +seconds. It should always be positive. + +The artwork dictionary member +is used to specify the {{ChapterInformation}} object's {{MediaImage/artwork}}. + +

    The {{MediaImage}} dictionary

    
    From 1c90b91ef09a09464973483e4afe6c22d26da2fb Mon Sep 17 00:00:00 2001
    From: jiamingc 
    Date: Thu, 14 Dec 2023 14:46:53 -0800
    Subject: [PATCH 03/48] Update index.bs
    
    ---
     index.bs | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/index.bs b/index.bs
    index c7792d2..5664458 100644
    --- a/index.bs
    +++ b/index.bs
    @@ -940,7 +940,7 @@ interface MediaMetadata {
       attribute DOMString artist;
       attribute DOMString album;
       attribute FrozenArray<MediaImage> artwork;
    -  attribute FrozenArray chapterInfo;
    +  attribute FrozenArray<ChapterInformation> chapterInfo;
     };
     
     dictionary MediaMetadataInit {
    @@ -948,7 +948,7 @@ dictionary MediaMetadataInit {
       DOMString artist = "";
       DOMString album = "";
       sequence<MediaImage> artwork = [];
    -  sequence chapterInfo = [];
    +  sequence<ChapterInformation> chapterInfo = [];
     };
     
    @@ -1177,7 +1177,7 @@ invoked, the user agent MUST run the following steps: dictionary ChapterInformation { DOMString title = ""; double startTime = ""; - attribute FrozenArray artwork; + attribute FrozenArray<MediaImage> artwork; }; From 58fcc5234267ac7308ed661d9fe4d97ff6a70bce Mon Sep 17 00:00:00 2001 From: jiamingc Date: Fri, 15 Dec 2023 15:19:54 -0800 Subject: [PATCH 04/48] Update index.bs resolve comments --- index.bs | 52 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/index.bs b/index.bs index 5664458..68edc00 100644 --- a/index.bs +++ b/index.bs @@ -1176,7 +1176,7 @@ invoked, the user agent MUST run the following steps: dictionary ChapterInformation { DOMString title = ""; - double startTime = ""; + double startTime = 0; attribute FrozenArray<MediaImage> artwork; }; @@ -1186,10 +1186,56 @@ used to specify the {{ChapterInformation}} object's {{MediaImage/title}}. The startTime dictionary member is used to specify the {{ChapterInformation}} object's {{MediaImage/startTime}} in -seconds. It should always be positive. +seconds. It should not be negative. The artwork dictionary member -is used to specify the {{ChapterInformation}} object's {{MediaImage/artwork}}. +is used to specify the {{ChapterInformation}} object's {{MediaImage/artwork}}. On +getting, it MUST return the result of the following steps: +
      +
    1. + Let frozenArtwork be an empty list of type {{MediaImage}}. +
    2. +
    3. + For each entry in the {{ChapterInformation}}'s artwork images, perform the following steps: +
        +
      1. + Let image be a new {{MediaImage}}. +
      2. +
      3. + Set image's {{MediaImage/src}} to entry's + {{MediaImage/src}}. +
      4. +
      5. + Set image's {{MediaImage/sizes}} to entry's + {{MediaImage/sizes}}. +
      6. +
      7. + Set image's {{MediaImage/type}} to entry's + {{MediaImage/type}}. +
      8. + +
      9. + Call Object.freeze on image, to prevent + accidental mutation by scripts. +
      10. +
      11. + Append image to frozenArtwork. +
      12. +
      +
    4. +
    5. + Create a frozen array from frozenArtwork. +
    6. +
    + +On setting, it MUST run the convert artwork algorithm with the new value as +input, and set the {{MediaMetadata}}'s artwork +images as the result if it succeeded.

    The {{MediaImage}} dictionary

    From ac87a02d0fe00e35f347234bf8f219fd1ae0c0cb Mon Sep 17 00:00:00 2001 From: jiamingc Date: Fri, 15 Dec 2023 15:26:09 -0800 Subject: [PATCH 05/48] Update index.bs --- index.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 68edc00..34ee670 100644 --- a/index.bs +++ b/index.bs @@ -1197,7 +1197,7 @@ getting, it MUST return the result of the following steps:
  • For each entry in the {{ChapterInformation}}'s artwork images, perform the following steps: + for="ChapterInformation">artwork images, perform the following steps:
    1. Let image be a new {{MediaImage}}. @@ -1234,7 +1234,7 @@ getting, it MUST return the result of the following steps:
    On setting, it MUST run the convert artwork algorithm with the new value as -input, and set the {{MediaMetadata}}'s artwork +input, and set the {{ChapterInformation}}'s artwork images as the result if it succeeded. From 690f3426498b7b83b287fd9091de522cadb6ab32 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Tue, 19 Dec 2023 17:45:38 -0800 Subject: [PATCH 06/48] Update index.bs: add examples --- index.bs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 34ee670..d8119fc 100644 --- a/index.bs +++ b/index.bs @@ -1381,14 +1381,18 @@ If disabled in the document, the User Agent MUST NOT select the document's media title: "Episode Title", artist: "Podcast Host", album: "Podcast Title", - artwork: [{src: "podcast.jpg"}] + artwork: [{src: "podcast.jpg"}], + chapterInfo: [ + {title: "Chapter 1", startTime: 0, artwork: [{src: "chapter1.jpg"}]}, + {title: "Chapter 2", startTime: 120, artwork: [{src: "chapter2.jpg"}]} + ] }); Alternatively, providing multiple artwork images in the metadata can let the user agent be able to select different artwork images for different display purposes and better fit - for different screens: + for different screens (the same for the artwork in {{MediaMetadata/chapterInfo}}):
         navigator.mediaSession.metadata = new MediaMetadata({
    @@ -1403,6 +1407,16 @@ If disabled in the document, the User Agent MUST NOT select the document's media
             {src: "podcast_hd.png", sizes: "256x256", type: "image/png"},
             {src: "podcast.ico", sizes: "128x128 256x256", type: "image/x-icon"}
           ]
    +      chapterInfo: [
    +        {title: "Chapter 1", startTime: 0, artwork: [
    +           {src: "chapter1_a.jpg", sizes: "128x128", type: "image/jpeg"},
    +           {src: "chapter1_b.png", sizes: "256x256", type: "image/png"}
    +         ]},
    +        {title: "Chapter 2", startTime: 120, artwork: [
    +           {src: "chapter2_a.jpg", sizes: "128x128", type: "image/jpeg"},
    +           {src: "chapter2_b.png", sizes: "256x256", type: "image/png"}
    +         ]}
    +      ]
         });
       
    From af180fff92fc5de8fafc11afea273c148b72cdc4 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Tue, 19 Dec 2023 18:20:47 -0800 Subject: [PATCH 07/48] Update explainer.md --- explainer.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/explainer.md b/explainer.md index 142a186..df88c59 100644 --- a/explainer.md +++ b/explainer.md @@ -107,8 +107,9 @@ interface MediaSession : EventTarget { ### The `MediaMetadata` interface A `MediaMetadata` object can contain media metadata like title, artist, album -and album art. To set the metadata for a `MediaSession`, the page should create -a `MediaMetadata` object and assign it to a `MediaSession` object: +album art and video chapter information. To set the metadata for a `MediaSession`, +the page should create a `MediaMetadata` object and assign it to a `MediaSession` +object: ```javascript navigator.mediaSession.metadata = new MediaMetadata(/* MediaMetadata constructor */); @@ -123,6 +124,7 @@ interface MediaMetadata { attribute DOMString artist; attribute DOMString album; attribute FrozenArray artwork; + attribute FrozenArray chapterInfo; }; dictionary MediaImage { @@ -130,6 +132,12 @@ dictionary MediaImage { DOMString sizes = ""; DOMString type = ""; }; + +dictionary ChapterInformation { + DOMString title = ""; + double startTime = 0; + attribute FrozenArray artwork; +}; ``` ### The `MediaPositionState` dictionary From bf940ad2577a1805ecdd4f4945b41a212cad9828 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Wed, 20 Dec 2023 12:49:14 -0800 Subject: [PATCH 08/48] Update index.bs --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index d8119fc..6cd4c2c 100644 --- a/index.bs +++ b/index.bs @@ -1406,7 +1406,7 @@ If disabled in the document, the User Agent MUST NOT select the document's media {src: "podcast.png", sizes: "128x128", type: "image/png"}, {src: "podcast_hd.png", sizes: "256x256", type: "image/png"}, {src: "podcast.ico", sizes: "128x128 256x256", type: "image/x-icon"} - ] + ], chapterInfo: [ {title: "Chapter 1", startTime: 0, artwork: [ {src: "chapter1_a.jpg", sizes: "128x128", type: "image/jpeg"}, From 9d60ac789d5e59e6bb9de6bd125eca3792d43f0e Mon Sep 17 00:00:00 2001 From: jiamingc Date: Mon, 22 Jan 2024 16:05:22 -0800 Subject: [PATCH 09/48] Update index.bs Co-authored-by: youennf --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 6cd4c2c..ae28add 100644 --- a/index.bs +++ b/index.bs @@ -940,7 +940,7 @@ interface MediaMetadata { attribute DOMString artist; attribute DOMString album; attribute FrozenArray<MediaImage> artwork; - attribute FrozenArray<ChapterInformation> chapterInfo; + readonly attribute FrozenArray<ChapterInformation> chapterInfo; }; dictionary MediaMetadataInit { From 3e3ee8c02296aaeb26606e78d2f27ad929ea070e Mon Sep 17 00:00:00 2001 From: jiamingc Date: Mon, 22 Jan 2024 16:29:40 -0800 Subject: [PATCH 10/48] Update index.bs --- index.bs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/index.bs b/index.bs index ae28add..3baa47f 100644 --- a/index.bs +++ b/index.bs @@ -940,7 +940,7 @@ interface MediaMetadata { attribute DOMString artist; attribute DOMString album; attribute FrozenArray<MediaImage> artwork; - readonly attribute FrozenArray<ChapterInformation> chapterInfo; + attribute sequence<ChapterInformation> chapterInfo; }; dictionary MediaMetadataInit { @@ -948,7 +948,7 @@ dictionary MediaMetadataInit { DOMString artist = ""; DOMString album = ""; sequence<MediaImage> artwork = []; - sequence<ChapterInformation> chapterInfo = []; + sequence<ChapterInformationInit> chapterInfo = []; }; @@ -1170,15 +1170,23 @@ invoked, the user agent MUST run the following steps:

    -

    The {{ChapterInformation}} dictionary

    +

    The {{ChapterInformation}} interface

     
    -dictionary ChapterInformation {
    +interface ChapterInformation {
    +  constructor(optional ChapterInformationInit init = {});
    +  DOMString title;
    +  double startTime;
    +  attribute FrozenArray<MediaImage> artwork;
    +};
    +
    +interface ChapterInformationInit {
       DOMString title = "";
       double startTime = 0;
    -  attribute FrozenArray<MediaImage> artwork;
    +  attribute FrozenArray<MediaImage> artwork = [];
     };
    +
     
    The title dictionary member is From 283feab2218002bef5738ff548a00404d46c26ce Mon Sep 17 00:00:00 2001 From: jiamingc Date: Mon, 22 Jan 2024 16:33:48 -0800 Subject: [PATCH 11/48] Update explainer.md --- explainer.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/explainer.md b/explainer.md index df88c59..b6a71c8 100644 --- a/explainer.md +++ b/explainer.md @@ -133,9 +133,9 @@ dictionary MediaImage { DOMString type = ""; }; -dictionary ChapterInformation { - DOMString title = ""; - double startTime = 0; +interface ChapterInformation { + DOMString title; + double startTime; attribute FrozenArray artwork; }; ``` From 2869d201b36e490c52563b1f3792abdd2c3920be Mon Sep 17 00:00:00 2001 From: jiamingc Date: Tue, 23 Jan 2024 16:08:09 -0800 Subject: [PATCH 12/48] Update explainer.md --- explainer.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/explainer.md b/explainer.md index b6a71c8..0a45b7d 100644 --- a/explainer.md +++ b/explainer.md @@ -134,8 +134,8 @@ dictionary MediaImage { }; interface ChapterInformation { - DOMString title; - double startTime; + attribute DOMString title; + attribute double startTime; attribute FrozenArray artwork; }; ``` From a1825ea4bc60264b66fa61000247328324930641 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Tue, 23 Jan 2024 16:11:17 -0800 Subject: [PATCH 13/48] Update index.bs --- index.bs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.bs b/index.bs index 3baa47f..c5c1e3b 100644 --- a/index.bs +++ b/index.bs @@ -1176,12 +1176,12 @@ invoked, the user agent MUST run the following steps: interface ChapterInformation { constructor(optional ChapterInformationInit init = {}); - DOMString title; - double startTime; + attribute DOMString title; + attribute double startTime; attribute FrozenArray<MediaImage> artwork; }; -interface ChapterInformationInit { +dictionary ChapterInformationInit { DOMString title = ""; double startTime = 0; attribute FrozenArray<MediaImage> artwork = []; From 140971c81a8e74b286bfb35cfd0c6173f64a5b7d Mon Sep 17 00:00:00 2001 From: jiamingc Date: Thu, 25 Jan 2024 14:44:11 -0800 Subject: [PATCH 14/48] Update index.bs --- index.bs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.bs b/index.bs index c5c1e3b..a6620b1 100644 --- a/index.bs +++ b/index.bs @@ -940,7 +940,7 @@ interface MediaMetadata { attribute DOMString artist; attribute DOMString album; attribute FrozenArray<MediaImage> artwork; - attribute sequence<ChapterInformation> chapterInfo; + readonly attribute FrozenArray<ChapterInformation> chapterInfo; }; dictionary MediaMetadataInit { @@ -1178,13 +1178,13 @@ interface ChapterInformation { constructor(optional ChapterInformationInit init = {}); attribute DOMString title; attribute double startTime; - attribute FrozenArray<MediaImage> artwork; + readonly attribute FrozenArray<MediaImage> artwork; }; dictionary ChapterInformationInit { DOMString title = ""; double startTime = 0; - attribute FrozenArray<MediaImage> artwork = []; + sequence<MediaImage> artwork = []; }; From 27cc4db5b00e1d27502d94cd4e504000b062d77e Mon Sep 17 00:00:00 2001 From: jiamingc Date: Thu, 25 Jan 2024 14:49:43 -0800 Subject: [PATCH 15/48] Update index.bs --- index.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index a6620b1..7e3a876 100644 --- a/index.bs +++ b/index.bs @@ -1176,8 +1176,8 @@ invoked, the user agent MUST run the following steps: interface ChapterInformation { constructor(optional ChapterInformationInit init = {}); - attribute DOMString title; - attribute double startTime; + readonly attribute DOMString title; + readonly attribute double startTime; readonly attribute FrozenArray<MediaImage> artwork; }; From a43f58f5b2d431dd732c71c151d98217413203d8 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Thu, 25 Jan 2024 14:52:42 -0800 Subject: [PATCH 16/48] Update explainer.md --- explainer.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/explainer.md b/explainer.md index 0a45b7d..b00b5fa 100644 --- a/explainer.md +++ b/explainer.md @@ -124,7 +124,7 @@ interface MediaMetadata { attribute DOMString artist; attribute DOMString album; attribute FrozenArray artwork; - attribute FrozenArray chapterInfo; + readonly attribute FrozenArray chapterInfo; }; dictionary MediaImage { @@ -136,7 +136,7 @@ dictionary MediaImage { interface ChapterInformation { attribute DOMString title; attribute double startTime; - attribute FrozenArray artwork; + readonly attribute FrozenArray artwork; }; ``` From 76909764bf18bbd7bf7d7fea3355144b588b66e6 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Fri, 26 Jan 2024 15:59:55 -0800 Subject: [PATCH 17/48] Update index.bs Co-authored-by: Jan-Ivar Bruaroey --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 7e3a876..4ce5e2a 100644 --- a/index.bs +++ b/index.bs @@ -940,7 +940,7 @@ interface MediaMetadata { attribute DOMString artist; attribute DOMString album; attribute FrozenArray<MediaImage> artwork; - readonly attribute FrozenArray<ChapterInformation> chapterInfo; + [SameObject] readonly attribute FrozenArray<ChapterInformation> chapterInfo; }; dictionary MediaMetadataInit { From edeaf6dee88208ca8436ea643b14593006e2c8b1 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Fri, 26 Jan 2024 16:14:23 -0800 Subject: [PATCH 18/48] Update index.bs Co-authored-by: Jan-Ivar Bruaroey --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 4ce5e2a..0b48537 100644 --- a/index.bs +++ b/index.bs @@ -1173,7 +1173,7 @@ invoked, the user agent MUST run the following steps:

    The {{ChapterInformation}} interface

    -
    +A {{ChapterInformation}} object is a representation of metadata for an individual chapter, such as the title of the section, its timestamp, and screenshot image data of this section, that can be used by user agents to provide a customized user interface. 
     interface ChapterInformation {
       constructor(optional ChapterInformationInit init = {});
       readonly attribute DOMString title;
    
    From 9edbfaea58470db25a63867288db5195553b9ef6 Mon Sep 17 00:00:00 2001
    From: jiamingc 
    Date: Fri, 26 Jan 2024 16:17:45 -0800
    Subject: [PATCH 19/48] Update index.bs
    
    Co-authored-by: Jan-Ivar Bruaroey 
    ---
     index.bs | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/index.bs b/index.bs
    index 0b48537..36c266e 100644
    --- a/index.bs
    +++ b/index.bs
    @@ -1178,7 +1178,7 @@ interface ChapterInformation {
       constructor(optional ChapterInformationInit init = {});
       readonly attribute DOMString title;
       readonly attribute double startTime;
    -  readonly attribute FrozenArray<MediaImage> artwork;
    +  [SameObject] readonly attribute FrozenArray<MediaImage> artwork;
     };
     
     dictionary ChapterInformationInit {
    
    From 7209afa0460e22ec69c23b4b906e6117fba6efea Mon Sep 17 00:00:00 2001
    From: jiamingc 
    Date: Fri, 26 Jan 2024 18:01:28 -0800
    Subject: [PATCH 20/48] Update index.bs
    
    After changing the ChapterInformation an interface from a dictionary, this change rewrites the corresponding description for it.
    ---
     index.bs | 166 ++++++++++++++++++++++++++++++++++++++++++++++++++-----
     1 file changed, 153 insertions(+), 13 deletions(-)
    
    diff --git a/index.bs b/index.bs
    index 36c266e..f66bbf8 100644
    --- a/index.bs
    +++ b/index.bs
    @@ -1173,7 +1173,6 @@ invoked, the user agent MUST run the following steps:
     

    The {{ChapterInformation}} interface

    -A {{ChapterInformation}} object is a representation of metadata for an individual chapter, such as the title of the section, its timestamp, and screenshot image data of this section, that can be used by user agents to provide a customized user interface. 
     interface ChapterInformation {
       constructor(optional ChapterInformationInit init = {});
       readonly attribute DOMString title;
    @@ -1189,16 +1188,132 @@ dictionary ChapterInformationInit {
     
     
    -The title dictionary member is -used to specify the {{ChapterInformation}} object's {{MediaImage/title}}. +

    + A {{ChapterInformation}} object is a representation of metadata for an individual + chapter, such as the title of the section, its timestamp, and screenshot image data + of this section, that can be used by user agents to provide a customized user interface. +

    + +

    + A {{ChapterInformation}} can have an associated + MediaMetadata. +

    + +

    + A {{ChapterInformation}} has an associated title + which is DOMString. +

    + +

    + A {{ChapterInformation}} has an associated + startTime which is double. +

    + +

    + A {{ChapterInformation}} has an associated list of +artwork images. +

    -The startTime dictionary member -is used to specify the {{ChapterInformation}} object's {{MediaImage/startTime}} in -seconds. It should not be negative. +

    + A {{ChapterInformation}} is said to be an empty metadata if it is equal + to `null` or all the following conditions are true: +

    +

    + +

    + The ChapterInformation(init) + constructor, when invoked, MUST run the following steps: -The artwork dictionary member -is used to specify the {{ChapterInformation}} object's {{MediaImage/artwork}}. On -getting, it MUST return the result of the following steps: +

      +
    1. + Let chapterInfo be a new {{ChapterInformation}} object. +
    2. +
    3. + Set chapterInfo's {{ChapterInformation/title}} to init's + {{ChapterInformationInit/title}}. +
    4. +
    5. + Set chapterInfo's {{ChapterInformation/startTime}} to init's + {{ChapterInformationInit/startTime}}. +
    6. +
    7. + Run the convert artwork algorithm with init's + {{ChapterInformationInit/artwork}} as input and set + chapterInfo's artwork images as the + result if it succeeded. +
    8. +
    9. + Return chapterInfo. +
    10. +
    +

    + +When the convert artwork algorithm with input parameter is +invoked, the user agent MUST run the following steps: +
      +
    1. + Let output be an empty list of type {{MediaImage}}. +
    2. +
    3. + For each entry in input's + {{ChapterInformationInit/artwork}}, perform the following steps: +
        +
      1. + Let image be a new {{MediaImage}}. +
      2. +
      3. Let baseURL be the API base URL specified by the entry + settings object.
      4. +
      5. + Parse entry's {{MediaImage/src}} using + baseURL. If it does not return failure, set + image's {{MediaImage/src}} to the return value. Otherwise, + throw a TypeError and abort these steps. +
      6. +
      7. + Set image's {{MediaImage/sizes}} to entry's + {{MediaImage/sizes}}. +
      8. +
      9. + Set image's {{MediaImage/type}} to entry's + {{MediaImage/type}}. +
      10. +
      11. + Append image to the output. +
      12. +
      +
    4. +
    5. + Return output as result. +
    6. +
    + +

    + The title attribute + reflects the {{ChapterInformation}}'s title. On getting, + it MUST return the {{ChapterInformation}}'s title. On + setting, it MUST set the {{ChapterInformation}}'s title to + the given value. +

    + +

    + The startTime attribute + reflects the {{ChapterInformation}}'s startTime. On getting, + it MUST return the {{ChapterInformation}}'s startTime. On + setting, it MUST set the {{ChapterInformation}}'s startTime + to the given value. If the startTime is negative or greater than + duration, throw a TypeError +

    + +

    + The artwork + attribute reflects the {{ChapterInformation}}'s artwork + images. On getting, it MUST return the result of the following steps:

    1. Let frozenArtwork be an empty list of type {{MediaImage}}. @@ -1240,11 +1355,36 @@ getting, it MUST return the result of the following steps: Create a frozen array from frozenArtwork.
    + On setting, it MUST run the + convert artwork algorithm with the new value as input, and + set the {{ChapterInformation}}'s artwork images as the + result if it succeeded. +

    -On setting, it MUST run the convert artwork algorithm with the new value as -input, and set the {{ChapterInformation}}'s artwork -images as the result if it succeeded. - +

    + When {{ChapterInformation}}'s title, startTime or artwork images + are modified, the user agent MUST run the following steps: +

      +
    1. + If the instance has no associated [=ChapterInformation/media metadata=], + abort these steps. +
    2. +
    3. + Otherwise, queue a task to run the following substeps: +
        +
      1. + If the instance no longer has an associated media + metadata, abort these steps. +
      2. +
      3. + Otherwise, in parallel, run the update metadata + algorithm. +
      4. +
      +
    4. +
    +

    The {{MediaImage}} dictionary

    From 75b6dac47689df8cbb108c4f36a15c65cefc7514 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Fri, 26 Jan 2024 18:05:14 -0800 Subject: [PATCH 21/48] Update index.bs --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index f66bbf8..8f74473 100644 --- a/index.bs +++ b/index.bs @@ -1215,7 +1215,7 @@ artwork images.

    - A {{ChapterInformation}} is said to be an empty metadata if it is equal + A {{ChapterInformation}} is said to be an empty chapterInfo if it is equal to `null` or all the following conditions are true:

    • Its title is the empty string.
    • From 7a1501e44ebb3d162307c6f815eeee31b815c35e Mon Sep 17 00:00:00 2001 From: jiamingc Date: Fri, 26 Jan 2024 18:20:25 -0800 Subject: [PATCH 22/48] Update index.bs --- index.bs | 50 ++++---------------------------------------------- 1 file changed, 4 insertions(+), 46 deletions(-) diff --git a/index.bs b/index.bs index 8f74473..46070d6 100644 --- a/index.bs +++ b/index.bs @@ -1313,52 +1313,10 @@ invoked, the user agent MUST run the following steps:

      The artwork attribute reflects the {{ChapterInformation}}'s artwork - images. On getting, it MUST return the result of the following steps: -

        -
      1. - Let frozenArtwork be an empty list of type {{MediaImage}}. -
      2. -
      3. - For each entry in the {{ChapterInformation}}'s artwork images, perform the following steps: -
          -
        1. - Let image be a new {{MediaImage}}. -
        2. -
        3. - Set image's {{MediaImage/src}} to entry's - {{MediaImage/src}}. -
        4. -
        5. - Set image's {{MediaImage/sizes}} to entry's - {{MediaImage/sizes}}. -
        6. -
        7. - Set image's {{MediaImage/type}} to entry's - {{MediaImage/type}}. -
        8. - -
        9. - Call Object.freeze on image, to prevent - accidental mutation by scripts. -
        10. -
        11. - Append image to frozenArtwork. -
        12. -
        -
      4. -
      5. - Create a frozen array from frozenArtwork. -
      6. -
      - On setting, it MUST run the - convert artwork algorithm with the new value as input, and - set the {{ChapterInformation}}'s artwork images as the - result if it succeeded. + images. On getting, it MUST return the {{ChapterInformation}}'s + artwork. On setting, it MUST run the convert artwork algorithm with the new value as + input, and set the {{ChapterInformation}}'s artwork + images as the result if it succeeded.

      From 6fbcc9a0aa1c4d7cbd806f4564eaf587fa1dc2b6 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Tue, 30 Jan 2024 15:34:17 -0800 Subject: [PATCH 23/48] Update explainer.md Co-authored-by: Jan-Ivar Bruaroey --- explainer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/explainer.md b/explainer.md index b00b5fa..9d39134 100644 --- a/explainer.md +++ b/explainer.md @@ -124,7 +124,7 @@ interface MediaMetadata { attribute DOMString artist; attribute DOMString album; attribute FrozenArray artwork; - readonly attribute FrozenArray chapterInfo; +[SameObject] readonly attribute FrozenArray chapterInfo; }; dictionary MediaImage { From 9d365de1ae675ef83ed18d97b1af95762d333b88 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Tue, 30 Jan 2024 15:34:40 -0800 Subject: [PATCH 24/48] Update explainer.md Co-authored-by: Jan-Ivar Bruaroey --- explainer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/explainer.md b/explainer.md index 9d39134..cadc7e7 100644 --- a/explainer.md +++ b/explainer.md @@ -136,7 +136,7 @@ dictionary MediaImage { interface ChapterInformation { attribute DOMString title; attribute double startTime; - readonly attribute FrozenArray artwork; + [SameObject] readonly attribute FrozenArray artwork; }; ``` From 7b13db7882d88e2232d8c932a1b8da6d90f4bc5f Mon Sep 17 00:00:00 2001 From: jiamingc Date: Tue, 30 Jan 2024 15:36:12 -0800 Subject: [PATCH 25/48] Update index.bs Co-authored-by: Jan-Ivar Bruaroey --- index.bs | 1 - 1 file changed, 1 deletion(-) diff --git a/index.bs b/index.bs index 46070d6..7f9537c 100644 --- a/index.bs +++ b/index.bs @@ -1174,7 +1174,6 @@ invoked, the user agent MUST run the following steps:

       interface ChapterInformation {
      -  constructor(optional ChapterInformationInit init = {});
         readonly attribute DOMString title;
         readonly attribute double startTime;
         [SameObject] readonly attribute FrozenArray<MediaImage> artwork;
      
      From f93c6a897f846bf0750ac5138e5c68f982cff50e Mon Sep 17 00:00:00 2001
      From: jiamingc 
      Date: Tue, 30 Jan 2024 15:37:43 -0800
      Subject: [PATCH 26/48] Update index.bs
      
      Co-authored-by: Jan-Ivar Bruaroey 
      ---
       index.bs | 5 ++---
       1 file changed, 2 insertions(+), 3 deletions(-)
      
      diff --git a/index.bs b/index.bs
      index 7f9537c..794a2db 100644
      --- a/index.bs
      +++ b/index.bs
      @@ -1225,9 +1225,8 @@ artwork images.
       

      - The ChapterInformation(init) - constructor, when invoked, MUST run the following steps: + To create a {{ChapterInformation}} with init, + run the following steps:

      1. From 49d55ec9a37f04521a9d17696da686c69bc93bbe Mon Sep 17 00:00:00 2001 From: jiamingc Date: Tue, 30 Jan 2024 15:38:16 -0800 Subject: [PATCH 27/48] Update index.bs Co-authored-by: Jan-Ivar Bruaroey --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 794a2db..01d02e4 100644 --- a/index.bs +++ b/index.bs @@ -1301,7 +1301,7 @@ invoked, the user agent MUST run the following steps:

        The startTime attribute - reflects the {{ChapterInformation}}'s startTime. On getting, + reflects the {{ChapterInformation}}'s startTime in seconds. On getting, it MUST return the {{ChapterInformation}}'s startTime. On setting, it MUST set the {{ChapterInformation}}'s startTime to the given value. If the startTime is negative or greater than From 37f5f381f5ea53beb93fb2dafa08dbe434968c0b Mon Sep 17 00:00:00 2001 From: jiamingc Date: Tue, 30 Jan 2024 15:42:15 -0800 Subject: [PATCH 28/48] Update index.bs Co-authored-by: Jan-Ivar Bruaroey --- index.bs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/index.bs b/index.bs index 01d02e4..927ed58 100644 --- a/index.bs +++ b/index.bs @@ -1312,9 +1312,7 @@ invoked, the user agent MUST run the following steps: The artwork attribute reflects the {{ChapterInformation}}'s artwork images. On getting, it MUST return the {{ChapterInformation}}'s - artwork. On setting, it MUST run the convert artwork algorithm with the new value as - input, and set the {{ChapterInformation}}'s artwork - images as the result if it succeeded. + artwork images.

        From b1d9923b3a39f2993377ed195047b20bc322126b Mon Sep 17 00:00:00 2001 From: jiamingc Date: Tue, 30 Jan 2024 18:15:42 -0800 Subject: [PATCH 29/48] Update index.bs --- index.bs | 60 ++++++++++++-------------------------------------------- 1 file changed, 12 insertions(+), 48 deletions(-) diff --git a/index.bs b/index.bs index 927ed58..39df27e 100644 --- a/index.bs +++ b/index.bs @@ -1021,7 +1021,8 @@ dictionary MediaMetadataInit { result if it succeeded.

      2. - Set metadata's {{MediaMetadata/chapterInfo}} to + Create a list of {{ChapterInformation}} from the sequence of chapters. Then + freeze this list and set it to metadata's {{MediaMetadata/chapterInfo}} to init's {{MediaMetadataInit/chapterInfo}}.
      3. @@ -1195,7 +1196,7 @@ dictionary ChapterInformationInit {

        A {{ChapterInformation}} can have an associated - MediaMetadata. + media metadata.

        @@ -1213,17 +1214,6 @@ dictionary ChapterInformationInit { artwork images.

        -

        - A {{ChapterInformation}} is said to be an empty chapterInfo if it is equal - to `null` or all the following conditions are true: -

        -

        -

        To create a {{ChapterInformation}} with init, run the following steps: @@ -1238,13 +1228,16 @@ artwork images.

      4. Set chapterInfo's {{ChapterInformation/startTime}} to init's - {{ChapterInformationInit/startTime}}. + {{ChapterInformationInit/startTime}}. If the startTime is + negative or greater than duration, throw + a TypeError
      5. Run the convert artwork algorithm with init's {{ChapterInformationInit/artwork}} as input and set - chapterInfo's artwork images as the - result if it succeeded. + chapterInfo's artwork images to the + result of creating a frozen array from the result + of the convert artwork algorithm.
      6. Return chapterInfo. @@ -1263,6 +1256,7 @@ invoked, the user agent MUST run the following steps: {{ChapterInformationInit/artwork}}, perform the following steps:
        1. + Let image be a new {{MediaImage}}.
        2. Let baseURL be the API base URL specified by the entry @@ -1294,18 +1288,13 @@ invoked, the user agent MUST run the following steps:

          The title attribute reflects the {{ChapterInformation}}'s title. On getting, - it MUST return the {{ChapterInformation}}'s title. On - setting, it MUST set the {{ChapterInformation}}'s title to - the given value. + it MUST return the {{ChapterInformation}}'s title.

          The startTime attribute reflects the {{ChapterInformation}}'s startTime in seconds. On getting, - it MUST return the {{ChapterInformation}}'s startTime. On - setting, it MUST set the {{ChapterInformation}}'s startTime - to the given value. If the startTime is negative or greater than - duration, throw a TypeError + it MUST return the {{ChapterInformation}}'s startTime.

          @@ -1315,31 +1304,6 @@ invoked, the user agent MUST run the following steps: artwork images.

          -

          - When {{ChapterInformation}}'s title, startTime or artwork images - are modified, the user agent MUST run the following steps: -

            -
          1. - If the instance has no associated [=ChapterInformation/media metadata=], - abort these steps. -
          2. -
          3. - Otherwise, queue a task to run the following substeps: -
              -
            1. - If the instance no longer has an associated media - metadata, abort these steps. -
            2. -
            3. - Otherwise, in parallel, run the update metadata - algorithm. -
            4. -
            -
          4. -
          -

          -

          The {{MediaImage}} dictionary

          
          From 9271fe46731f6615fcf198b4c0610189618d5ba1 Mon Sep 17 00:00:00 2001
          From: jiamingc 
          Date: Mon, 5 Feb 2024 18:17:56 -0800
          Subject: [PATCH 30/48] Update explainer.md
          
          Co-authored-by: Jan-Ivar Bruaroey 
          ---
           explainer.md | 2 +-
           1 file changed, 1 insertion(+), 1 deletion(-)
          
          diff --git a/explainer.md b/explainer.md
          index cadc7e7..aebc060 100644
          --- a/explainer.md
          +++ b/explainer.md
          @@ -124,7 +124,7 @@ interface MediaMetadata {
               attribute DOMString artist;
               attribute DOMString album;
               attribute FrozenArray artwork;
          -[SameObject] readonly attribute FrozenArray chapterInfo;
          +    [SameObject] readonly attribute FrozenArray chapterInfo;
           };
           
           dictionary MediaImage {
          
          From 4234faabe6a1be61f86e289f14784ea561afeb3f Mon Sep 17 00:00:00 2001
          From: jiamingc 
          Date: Mon, 5 Feb 2024 18:18:12 -0800
          Subject: [PATCH 31/48] Update index.bs
          
          Co-authored-by: Jan-Ivar Bruaroey 
          ---
           index.bs | 2 +-
           1 file changed, 1 insertion(+), 1 deletion(-)
          
          diff --git a/index.bs b/index.bs
          index 39df27e..afa4e06 100644
          --- a/index.bs
          +++ b/index.bs
          @@ -1230,7 +1230,7 @@ artwork images.
                 Set chapterInfo's {{ChapterInformation/startTime}} to init's
                 {{ChapterInformationInit/startTime}}. If the startTime is
                 negative or greater than duration, throw
          -      a TypeError
          +      a TypeError.
               
        3. Run the convert artwork algorithm with init's From 1a9cd3a5cf63b4e6c724180110f7ac4cd5ca0a3e Mon Sep 17 00:00:00 2001 From: jiamingc Date: Mon, 5 Feb 2024 18:19:14 -0800 Subject: [PATCH 32/48] Update index.bs Co-authored-by: Jan-Ivar Bruaroey --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index afa4e06..7393329 100644 --- a/index.bs +++ b/index.bs @@ -1229,7 +1229,7 @@ artwork images.
        4. Set chapterInfo's {{ChapterInformation/startTime}} to init's {{ChapterInformationInit/startTime}}. If the startTime is - negative or greater than duration, throw + negative or greater than [=duration=], throw a TypeError.
        5. From 0dcf14e570e045d12f82b5495eadadee356c10c4 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Mon, 5 Feb 2024 18:20:07 -0800 Subject: [PATCH 33/48] Update index.bs Co-authored-by: Jan-Ivar Bruaroey --- index.bs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 7393329..b7994e1 100644 --- a/index.bs +++ b/index.bs @@ -1236,8 +1236,7 @@ artwork images. Run the convert artwork algorithm with init's {{ChapterInformationInit/artwork}} as input and set chapterInfo's artwork images to the - result of creating a frozen array from the result - of the convert artwork algorithm. + result of [=Create a frozen array|creating a frozen array=] from the result.
        6. Return chapterInfo. From 95ffe0bff1ead08b7ffcfe0d837e6a434a36dad9 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Mon, 5 Feb 2024 18:20:40 -0800 Subject: [PATCH 34/48] Update index.bs Co-authored-by: Jan-Ivar Bruaroey --- index.bs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/index.bs b/index.bs index b7994e1..d914e18 100644 --- a/index.bs +++ b/index.bs @@ -1021,9 +1021,17 @@ dictionary MediaMetadataInit { result if it succeeded.
        7. - Create a list of {{ChapterInformation}} from the sequence of chapters. Then - freeze this list and set it to metadata's {{MediaMetadata/chapterInfo}} to - init's {{MediaMetadataInit/chapterInfo}}. + Let chapters be an empty list of type {{ChapterInformation}}. +
        8. +
        9. + For each entry in init's {{MediaMetadataInit/chapterInfo}}, + [=create a {{ChapterInformation}}=] from entry and append it to + chapters. +
        10. +
        11. + Set metadata's chapter information to the + result of [=Create a frozen array|creating a frozen array=] from + chapters.
        12. Return metadata. From 4a1cb191984b231f6432b82a8f64f5dfd960b829 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Mon, 5 Feb 2024 18:29:34 -0800 Subject: [PATCH 35/48] Update index.bs --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index d914e18..ea4a33f 100644 --- a/index.bs +++ b/index.bs @@ -1252,7 +1252,7 @@ artwork images.

        -When the convert artwork algorithm with input parameter is +When the convert artwork algorithm with input parameter is invoked, the user agent MUST run the following steps:
        1. From adde728b2763e6469b8062b2e3ab20da7f67fc92 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Mon, 5 Feb 2024 19:34:28 -0800 Subject: [PATCH 36/48] Update index.bs --- index.bs | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/index.bs b/index.bs index ea4a33f..5b3c5fe 100644 --- a/index.bs +++ b/index.bs @@ -1252,46 +1252,6 @@ artwork images.

        -When the convert artwork algorithm with input parameter is -invoked, the user agent MUST run the following steps: -
          -
        1. - Let output be an empty list of type {{MediaImage}}. -
        2. -
        3. - For each entry in input's - {{ChapterInformationInit/artwork}}, perform the following steps: -
            -
          1. - - Let image be a new {{MediaImage}}. -
          2. -
          3. Let baseURL be the API base URL specified by the entry - settings object.
          4. -
          5. - Parse entry's {{MediaImage/src}} using - baseURL. If it does not return failure, set - image's {{MediaImage/src}} to the return value. Otherwise, - throw a TypeError and abort these steps. -
          6. -
          7. - Set image's {{MediaImage/sizes}} to entry's - {{MediaImage/sizes}}. -
          8. -
          9. - Set image's {{MediaImage/type}} to entry's - {{MediaImage/type}}. -
          10. -
          11. - Append image to the output. -
          12. -
          -
        4. -
        5. - Return output as result. -
        6. -
        -

        The title attribute reflects the {{ChapterInformation}}'s title. On getting, From ea885c3373aa7e065da6f4908bb8f2dbc7009842 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Tue, 6 Feb 2024 13:35:45 -0800 Subject: [PATCH 37/48] Update explainer.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François Daoust --- explainer.md | 1 + 1 file changed, 1 insertion(+) diff --git a/explainer.md b/explainer.md index aebc060..844ecab 100644 --- a/explainer.md +++ b/explainer.md @@ -133,6 +133,7 @@ dictionary MediaImage { DOMString type = ""; }; +[Exposed=Window] interface ChapterInformation { attribute DOMString title; attribute double startTime; From 9959bcfed6500f1eed899a2b7665ae08de5be902 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Tue, 6 Feb 2024 13:36:12 -0800 Subject: [PATCH 38/48] Update index.bs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François Daoust --- index.bs | 1 + 1 file changed, 1 insertion(+) diff --git a/index.bs b/index.bs index 5b3c5fe..88e3a5a 100644 --- a/index.bs +++ b/index.bs @@ -1182,6 +1182,7 @@ invoked, the user agent MUST run the following steps:

        The {{ChapterInformation}} interface

        +[Exposed=Window]
         interface ChapterInformation {
           readonly attribute DOMString title;
           readonly attribute double startTime;
        
        From 8bf0611b5ce0f07c532d8031eac75f5072fd2693 Mon Sep 17 00:00:00 2001
        From: jiamingc 
        Date: Tue, 13 Feb 2024 13:08:54 -0800
        Subject: [PATCH 39/48] Update index.bs
        
        Co-authored-by: Chris Needham 
        ---
         index.bs | 2 +-
         1 file changed, 1 insertion(+), 1 deletion(-)
        
        diff --git a/index.bs b/index.bs
        index 88e3a5a..8aeddde 100644
        --- a/index.bs
        +++ b/index.bs
        @@ -1238,7 +1238,7 @@ artwork images.
             
      7. Set chapterInfo's {{ChapterInformation/startTime}} to init's {{ChapterInformationInit/startTime}}. If the startTime is - negative or greater than [=duration=], throw + negative, greater than [=duration=], or NaN, throw a TypeError.
      8. From 76e40d79a5d5c34af65c245e2c95608aa4146d21 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Thu, 22 Feb 2024 13:23:00 -0800 Subject: [PATCH 40/48] Update index.bs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: François Daoust --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 8aeddde..265be49 100644 --- a/index.bs +++ b/index.bs @@ -1025,7 +1025,7 @@ dictionary MediaMetadataInit {
      9. For each entry in init's {{MediaMetadataInit/chapterInfo}}, - [=create a {{ChapterInformation}}=] from entry and append it to + [=create a ChapterInformation=] from entry and append it to chapters.
      10. From 1b8b56414fbd1ebf8cb0253e2df0fb485d3582c6 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Thu, 22 Feb 2024 13:23:44 -0800 Subject: [PATCH 41/48] Update index.bs Co-authored-by: Jan-Ivar Bruaroey --- index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.bs b/index.bs index 265be49..6614594 100644 --- a/index.bs +++ b/index.bs @@ -1238,7 +1238,7 @@ artwork images.
      11. Set chapterInfo's {{ChapterInformation/startTime}} to init's {{ChapterInformationInit/startTime}}. If the startTime is - negative, greater than [=duration=], or NaN, throw + negative or greater than [=duration=], throw a TypeError.
      12. From 966b2cc1beb9715dde52ec191b1206eb2245a537 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Thu, 22 Feb 2024 13:38:56 -0800 Subject: [PATCH 42/48] Update explainer.md --- explainer.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/explainer.md b/explainer.md index 844ecab..8d8b239 100644 --- a/explainer.md +++ b/explainer.md @@ -106,8 +106,8 @@ interface MediaSession : EventTarget { ### The `MediaMetadata` interface -A `MediaMetadata` object can contain media metadata like title, artist, album -album art and video chapter information. To set the metadata for a `MediaSession`, +A `MediaMetadata` object can contain media metadata likelike title, artist, album, +artwork, and video chapter information. To set the metadata for a `MediaSession`, the page should create a `MediaMetadata` object and assign it to a `MediaSession` object: From 009a61ba460198695c5a55ac155b27d98292a335 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Thu, 22 Feb 2024 13:51:40 -0800 Subject: [PATCH 43/48] Update explainer.md --- explainer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/explainer.md b/explainer.md index 8d8b239..210b0ff 100644 --- a/explainer.md +++ b/explainer.md @@ -106,7 +106,7 @@ interface MediaSession : EventTarget { ### The `MediaMetadata` interface -A `MediaMetadata` object can contain media metadata likelike title, artist, album, +A `MediaMetadata` object can contain media metadata like title, artist, album, artwork, and video chapter information. To set the metadata for a `MediaSession`, the page should create a `MediaMetadata` object and assign it to a `MediaSession` object: From ae06c708d97669a9d118ce659041ca390d072096 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Fri, 23 Feb 2024 13:40:05 -0800 Subject: [PATCH 44/48] Update index.bs --- index.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 6614594..58d54fb 100644 --- a/index.bs +++ b/index.bs @@ -1046,8 +1046,8 @@ invoked, the user agent MUST run the following steps: Let output be an empty list of type {{MediaImage}}.
      13. - For each entry in input's - {{MediaMetadataInit/artwork}}, perform the following steps: + For each entry (which is an {{artwork}}) in input +(which is an {{artwork}} list), perform the following steps:
        1. Let image be a new {{MediaImage}}. From 2100bfc279060d9755d15848fa4992c7c656d4c0 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Fri, 23 Feb 2024 13:42:35 -0800 Subject: [PATCH 45/48] Update index.bs --- index.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 58d54fb..33b5256 100644 --- a/index.bs +++ b/index.bs @@ -1046,8 +1046,8 @@ invoked, the user agent MUST run the following steps: Let output be an empty list of type {{MediaImage}}.
        2. - For each entry (which is an {{artwork}}) in input -(which is an {{artwork}} list), perform the following steps: + For each entry (which is a {{MediaImage}}) in input +(which is a {{MediaImage}} list), perform the following steps:
          1. Let image be a new {{MediaImage}}. From 3f4cfa10c1990aa2f89736b11f12a8706057dce9 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Fri, 23 Feb 2024 13:46:57 -0800 Subject: [PATCH 46/48] Update index.bs --- index.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index 33b5256..891ea0e 100644 --- a/index.bs +++ b/index.bs @@ -1046,8 +1046,8 @@ invoked, the user agent MUST run the following steps: Let output be an empty list of type {{MediaImage}}.
          2. - For each entry (which is a {{MediaImage}}) in input -(which is a {{MediaImage}} list), perform the following steps: + For each entry in input (which is a {{MediaImage}} list), +perform the following steps:
            1. Let image be a new {{MediaImage}}. From 63c64c7bc2c4a9cf2793d5e5b2d528fdeb6e3fde Mon Sep 17 00:00:00 2001 From: jiamingc Date: Wed, 6 Mar 2024 17:10:11 -0800 Subject: [PATCH 47/48] Update index.bs --- index.bs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/index.bs b/index.bs index 891ea0e..3837a1a 100644 --- a/index.bs +++ b/index.bs @@ -1242,10 +1242,11 @@ artwork images. a TypeError.
            2. - Run the convert artwork algorithm with init's - {{ChapterInformationInit/artwork}} as input and set - chapterInfo's artwork images to the - result of [=Create a frozen array|creating a frozen array=] from the result. + Let {{ChapterInformationInit/artwork}} be the result of running the convert artwork algorithm. +
            3. +
            4. + Set chapterInfo's artwork images to the + result of [=Create a frozen array|creating a frozen array=] from {{ChapterInformationInit/artwork}}.
            5. Return chapterInfo. From dbf1354b39c50de6ceedd463e2e80f53651db720 Mon Sep 17 00:00:00 2001 From: jiamingc Date: Wed, 6 Mar 2024 17:14:15 -0800 Subject: [PATCH 48/48] Update explainer.md --- explainer.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/explainer.md b/explainer.md index 210b0ff..0e37c4a 100644 --- a/explainer.md +++ b/explainer.md @@ -135,8 +135,8 @@ dictionary MediaImage { [Exposed=Window] interface ChapterInformation { - attribute DOMString title; - attribute double startTime; + readonly attribute DOMString title; + readonly attribute double startTime; [SameObject] readonly attribute FrozenArray artwork; }; ```