From 2e39d54351512dbeb27af632f56f16d9474c9b62 Mon Sep 17 00:00:00 2001
From: jiamingc
@@ -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 {
0
.0
.
+ +dictionary ChapterInformation { + DOMString title = ""; + double startTime = ""; + attribute FrozenArray+ +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}}. + +artwork; +}; +
From 1c90b91ef09a09464973483e4afe6c22d26da2fb Mon Sep 17 00:00:00 2001 From: jiamingc@@ -1177,7 +1177,7 @@ invoked, the user agent MUST run the following steps: dictionary ChapterInformation { DOMString title = ""; double startTime = ""; - attribute FrozenArrayDate: 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 = []; };
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
-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
- +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: jiamingcDate: 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: +
+
+ + +- Its title is the empty string.
+- Its startTime is
+0
.- Its artwork images length + is
+0
.+ 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: +
+
+ + +When the convert artwork algorithm with input parameter is +invoked, the user agent MUST run the following steps: +- + Let chapterInfo be a new {{ChapterInformation}} object. +
+- + Set chapterInfo's {{ChapterInformation/title}} to init's + {{ChapterInformationInit/title}}. +
+- + Set chapterInfo's {{ChapterInformation/startTime}} to init's + {{ChapterInformationInit/startTime}}. +
+- + Run the convert artwork algorithm with init's + {{ChapterInformationInit/artwork}} as input and set + chapterInfo's artwork images as the + result if it succeeded. +
+- + Return chapterInfo. +
++
+ +- + Let output be an empty list of type {{MediaImage}}. +
+- + For each entry in input's + {{ChapterInformationInit/artwork}}, perform the following steps: +
++
+- + Let image be a new {{MediaImage}}. +
+- Let baseURL be the API base URL specified by the entry + settings object.
+- + 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. +
+- + Set image's {{MediaImage/sizes}} to entry's + {{MediaImage/sizes}}. +
+- + Set image's {{MediaImage/type}} to entry's + {{MediaImage/type}}. +
+- + Append image to the output. +
+- + Return output as result. +
++ 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:
+ 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. - +
- 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.
+ When {{ChapterInformation}}'s title, startTime or artwork images + are modified, the user agent MUST run the following steps: +
+
+- + If the instance has no associated [=ChapterInformation/media metadata=], + abort these steps. +
+- + Otherwise, queue a task to run the following substeps: +
++
+- + If the instance no longer has an associated media + metadata, abort these steps. +
+- + Otherwise, in parallel, run the update metadata + algorithm. +
+The {{MediaImage}} dictionary
From 75b6dac47689df8cbb108c4f36a15c65cefc7514 Mon Sep 17 00:00:00 2001 From: jiamingcDate: 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: jiamingcDate: 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: -
-
- 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.- - Let frozenArtwork be an empty list of type {{MediaImage}}. -
-- - For each entry in the {{ChapterInformation}}'s artwork images, perform the following steps: -
--
-- - Let image be a new {{MediaImage}}. -
-- - Set image's {{MediaImage/src}} to entry's - {{MediaImage/src}}. -
-- - Set image's {{MediaImage/sizes}} to entry's - {{MediaImage/sizes}}. -
-- - Set image's {{MediaImage/type}} to entry's - {{MediaImage/type}}. -
- -- - Call Object.freeze on image, to prevent - accidental mutation by scripts. -
-- - Append image to frozenArtwork. -
-- - Create a frozen array from frozenArtwork. -
-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: jiamingcDate: 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:
- 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. - - 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}}.
- @@ -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: -
-
- -- Its title is the empty string.
-- Its startTime is
-0
.- Its artwork images length - is
-0
.To create a {{ChapterInformation}} with init, run the following steps: @@ -1238,13 +1228,16 @@ artwork images.
- Set chapterInfo's {{ChapterInformation/startTime}} to init's - {{ChapterInformationInit/startTime}}. + {{ChapterInformationInit/startTime}}. If the startTime is + negative or greater than duration, throw + a TypeError
- 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.
- Return chapterInfo. @@ -1263,6 +1256,7 @@ invoked, the user agent MUST run the following steps: {{ChapterInformationInit/artwork}}, perform the following steps:
-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:
- + Let image be a new {{MediaImage}}.
- 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: -
-
- -- - If the instance has no associated [=ChapterInformation/media metadata=], - abort these steps. -
-- - Otherwise, queue a task to run the following substeps: -
--
-- - If the instance no longer has an associated media - metadata, abort these steps. -
-- - Otherwise, in parallel, run the update metadata - algorithm. -
-The {{MediaImage}} dictionary
From 9271fe46731f6615fcf198b4c0610189618d5ba1 Mon Sep 17 00:00:00 2001 From: jiamingcDate: 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. - 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. - 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.
- 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. - 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. - - 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}}. +
+- + For each entry in init's {{MediaMetadataInit/chapterInfo}}, + [=create a {{ChapterInformation}}=] from entry and append it to + chapters. +
+- + Set metadata's chapter information to the + result of [=Create a frozen array|creating a frozen array=] from + chapters.
- 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 -invoked, the user agent MUST run the following steps: -
- 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. -
-- - Let output be an empty list of type {{MediaImage}}. -
-- - For each entry in input's - {{ChapterInformationInit/artwork}}, perform the following steps: -
--
-- - - Let image be a new {{MediaImage}}. -
-- Let baseURL be the API base URL specified by the entry - settings object.
-- - 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. -
-- - Set image's {{MediaImage/sizes}} to entry's - {{MediaImage/sizes}}. -
-- - Set image's {{MediaImage/type}} to entry's - {{MediaImage/type}}. -
-- - Append image to the output. -
-- - Return output as result. -
-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: jiamingcDate: 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. - 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.- 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 { - 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.
- 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. - 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.- 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}}. - - 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:
- 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}}. - - 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:
- 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}}. - - 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:
- 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. - - 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. +
+- + Set chapterInfo's artwork images to the + result of [=Create a frozen array|creating a frozen array=] from {{ChapterInformationInit/artwork}}.
- 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; }; ```