Allow to whitelist certain video elements

Created on 13 December 2022, almost 2 years ago
Updated 2 March 2023, over 1 year ago

Problem/Motivation

Cookie content blocks the video_embed_field/responsive_video library. This is a good default, since most videos needs consent to play. However some providers (in my case wistia in privacy mode) does not do any tracking, and can be showed directly, and should not be blocked.
Since we also embed youtube / vimeo fields we sitll want to have cookie_content_blocker enabled, but with an exception for some other elements / provider.

Currently the only way i've found is to always process this specific element, but that's not really good. Best case there would be an approach to not block specific elements, without patching cookie_content_blocker for those specific providers / use cases.

@@ -37,7 +37,9 @@ class ElementProcessor extends ElementProcessorBase {
       if (!$processor->applies($element)) {
         continue;
       }
-
+      if (isset($element['children']['#theme']) && $element['children']['#theme'] == "wistia_video") {
+        continue;
+      }
       $element = $processor->processElement($element);
     }

Proposed resolution

Provide an api / hook to override some stuff.

📌 Task
Status

Closed: won't fix

Version

2.0

Component

Code

Created by

🇧🇪Belgium mallezie Loenhout

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024