Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module replaces embedded videos with a placeholder that requires user consent before loading the actual content. It offers a text filter and an oEmbed widget for media, allowing customization of the placeholder message and the domains it applies to.

Orejime Complient Vidéos

Module replace embeded vidéos into placeholder with custom message and urls.

The module provide a text filter and a oEmbed widget for media.

The embeded vidéos content are placed in a <template> element and a custom html element is placed in place of the original element.
When the user accept the consent, the content of the is put in the dom and placeholders are removed.

Requirements

This module require Orejime to be installed and running.

Installation

Install as you would normally install a contributed Drupal module.
For further information, see Installing Drupal Modules.

Configuration

Once the module is enabled, go to your text filters and enable the Convert Videos into Orejime Videos filter.

If you plan using the oEmbed widget on media

If you want to use the oEmbed widget on media, go to your medias display and change the widget of oEmbed field to Orejime oEmbed content

Warning if you are using orejime video text filter, check that textfilter do not run on media that are using the custom widget.
If it happens, simply put the media text processor after the oreijme video text processor.

Configuring the filtered domains

The module doesn’t provide, for now, configuration in the admin.
You will need to edit the orejime_videos.settings.yml in your config file and reimport it.

Inside the filtered_domains you can setup a list of custom consent (by default we provide examples for youtube, vimeo and twitter).
Example:

  youtube:
    orejime_consent: youtube
    domains:
      - youtube.com
      - youtu.be
    htmlToExtUrl:
      -
        pattern: '/<iframe[^>]*src\s*=\s*"(?:https?(?::|%3A)\/\/)?(?:www\.)?youtu\.?be(?:\.com)?\/(?:watch|embed)?(?:.*v=|.*v%3D|v\/|\/)([\w\-_]+)\&?/im'
        replacement: 'https://youtu.be/$1'

For each consent you can define:

  • orejime_consent: the name of the consent in orejime.

    You can use the same orejime consent name for multiples filters

  • domains: the domains names of the service you want to filter, this need to be an array
  • htmlToExtUrl: a set of rules to replace the "embed" code into the orejime video placeholder.

    Please note that this field allow multiples entries if needed.

    • pattern: a regexp pattern for the replacement.
      Use capturing groups to get elements of the embed that can be used to generate url replacement
    • replacement: embed is also replaced by an external url so the user can watch the video outside the website.
      That external url use the capturing group values.

Translate displayed message

Message displayed can be translated in Drupal's translate interface

Change displayed message

You can change the displayed message by copy pasting the template to your custom theme and edit it.

Orejime configuration

Please refer to Orejime documentation.

Here is an example of apps configuration for orejime:

                {
                  name: "youtube",
                  title: "Youtube",
                  cookies: ["matomo_session", "pk_id", "pk_ses", "_pk_ref", "_pk_cvar"],
                  purposes: ["analytics"],
                  default: false
                },
                {
                  name: "vimeo",
                  title: "Vimeo",
                  cookies: ["matomo_session", "pk_id", "pk_ses", "_pk_ref", "_pk_cvar"],
                  purposes: ["analytics"],
                  default: false
                },
                {
                  name: "twitter",
                  title: "Twitter",
                  cookies: ["matomo_session", "pk_id", "pk_ses", "_pk_ref", "_pk_cvar"],
                  purposes: ["analytics"],
                  default: false
                }

Theme adaptation

Since we replace your
You will need to adapt your theme to apply your video styling to the placeholder.

Activity

Total releases
5
First release
Feb 2025
Latest release
1 month ago
Releases (12 mo)
4 ▲ from 1
Maintenance
Active

Release Timeline

Releases

Version Type Release date
1.1.1 Stable Jun 9, 2026
1.1.0 Stable Jan 23, 2026
1.0.4 Stable Jan 22, 2026
1.0.3 Stable Nov 17, 2025
1.0.2 Stable Feb 14, 2025