From e7690f52250eda06720077f3abd9d2d158fc36de Mon Sep 17 00:00:00 2001 From: danijel-ristic <168181386+danijel-ristic@users.noreply.github.com> Date: Fri, 27 Nov 2026 08:45:44 +0100 Subject: [PATCH 1/6] =?UTF-8?q?=E2=9C=A8=20[amp-brid-player]=20Allow=20the?= =?UTF-8?q?=20JSON=20config=20child=20in=20the=20validator?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit amp-brid-player and its alias amp-target-video-player have read a child + + + + + diff --git a/extensions/amp-brid-player/0.1/test/validator-amp-brid-player.out b/extensions/amp-brid-player/0.1/test/validator-amp-brid-player.out index 7f347c2f511a..303d4078a40e 100644 --- a/extensions/amp-brid-player/0.1/test/validator-amp-brid-player.out +++ b/extensions/amp-brid-player/0.1/test/validator-amp-brid-player.out @@ -84,5 +84,23 @@ amp-brid-player/0.1/test/validator-amp-brid-player.html:72:2 The attribute 'dock | layout="responsive" | width="480" height="270"> | +| +| +| +| +| +| +| +| | | diff --git a/extensions/amp-brid-player/amp-brid-player.md b/extensions/amp-brid-player/amp-brid-player.md index ee23adfe18e2..6e2de38c3f4b 100644 --- a/extensions/amp-brid-player/amp-brid-player.md +++ b/extensions/amp-brid-player/amp-brid-player.md @@ -83,6 +83,29 @@ For more details, see [documentation on the docking extension itself](https://am This element includes [common attributes](https://amp.dev/documentation/guides-and-tutorials/learn/common_attributes) extended to AMP components. +## Custom configuration + +Additional player configuration can be supplied as a JSON object in a +` + +``` + ## Actions ### `play` diff --git a/extensions/amp-brid-player/validator-amp-brid-player.protoascii b/extensions/amp-brid-player/validator-amp-brid-player.protoascii index e3d7f4aea171..9468a6fbd0f8 100644 --- a/extensions/amp-brid-player/validator-amp-brid-player.protoascii +++ b/extensions/amp-brid-player/validator-amp-brid-player.protoascii @@ -118,3 +118,45 @@ tags: { # supported_layouts: RESPONSIVE } } +tags: { # > script[type=application/json] + html_format: AMP + tag_name: "SCRIPT" + spec_name: "amp-brid-player > script[type=application/json]" + mandatory_parent: "AMP-BRID-PLAYER" + requires_extension: "amp-brid-player" + attrs: { + name: "type" + mandatory: true + value_casei: "application/json" + dispatch_key: NAME_VALUE_PARENT_DISPATCH + } + attr_lists: "nonce-attr" + cdata: { + disallowed_cdata_regex: { + regex: " + See [amp-brid-player rules](https://github.com/ampproject/amphtml/blob/main/extensions/amp-brid-player/validator-amp-brid-player.protoascii) in the AMP validator specification. + + From 5cf80adb7561ef12ee49aff8fe58e3b9a60d1529 Mon Sep 17 00:00:00 2001 From: danijel-ristic <168181386+danijel-ristic@users.noreply.github.com> Date: Tue, 1 Dec 2026 08:22:39 +0100 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=90=9B=20[amp-brid-player]=20URL-enco?= =?UTF-8?q?de=20the=20JSON=20config=20in=20the=20iframe=20URL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The config was appended to the iframe src as raw JSON, so a #, &, =, + or % in a value cut off the URL or added extra query params. Encode it with encodeURIComponent. When a + + + + + + + + + + +
+ +
+
+ + + + diff --git a/extensions/amp-brid-player/0.1/test/validator-amp-brid-player.out b/extensions/amp-brid-player/0.1/test/validator-amp-brid-player.out index 303d4078a40e..48ae86934bd3 100644 --- a/extensions/amp-brid-player/0.1/test/validator-amp-brid-player.out +++ b/extensions/amp-brid-player/0.1/test/validator-amp-brid-player.out @@ -102,5 +102,51 @@ amp-brid-player/0.1/test/validator-amp-brid-player.html:72:2 The attribute 'dock | width="480" height="270"> | | +| +| +| +>> ^~~~~~~~~ +amp-brid-player/0.1/test/validator-amp-brid-player.html:105:4 The parent tag of tag 'amphtml engine script' is 'amp-brid-player', but it can only be 'head'. (see https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml/#required-markup) +| +| +| +| +>> ^~~~~~~~~ +amp-brid-player/0.1/test/validator-amp-brid-player.html:114:4 The text inside tag 'script' contains 'html comments', which is disallowed. (see https://amp.dev/documentation/components/amp-brid-player/) +| +| +| +|
+| +>> ^~~~~~~~~ +amp-brid-player/0.1/test/validator-amp-brid-player.html:124:6 The parent tag of tag 'amphtml engine script' is 'div', but it can only be 'head'. (see https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml/#required-markup) +|
+|
+| +| +| +>> ^~~~~~~~~ +amp-brid-player/0.1/test/validator-amp-brid-player.html:134:4 The attribute 'src' may not appear in tag 'script'. (see https://amp.dev/documentation/components/amp-brid-player/) +| | | From 83e6aa488016700dc55625ab25ff6a6b691a1689 Mon Sep 17 00:00:00 2001 From: danijel-ristic <168181386+danijel-ristic@users.noreply.github.com> Date: Tue, 1 Dec 2026 08:22:40 +0100 Subject: [PATCH 6/6] =?UTF-8?q?=F0=9F=93=96=20[amp-brid-player]=20Clarify?= =?UTF-8?q?=20the=20alias=20and=20the=20JSON=20config=20in=20the=20docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Say that amp-target-video-player takes the same attributes and still needs the amp-brid-player extension script, that only a single