Orejime cookie banner

This project is not covered by Drupal’s security advisory policy.

Orejime Media ensures external media (such as YouTube, Vimeo, and Power BI) is only loaded after a visitor gives cookie consent through Orejime. Without consent, the module shows a clear placeholder with a link to grant consent or open the media externally.

Features

  • Automatically replaces supported frontend media embeds with a consent placeholder.
  • Dynamically loads the real embed after consent is granted; if consent is withdrawn, it restores the placeholder.
  • Service mapping through config entities (orejime_media_service) with:
    • Consent key => required
    • Media source plugin ID => optional
    • Domain matching (multiple domains supported)
  • Ships with example configurations for YouTube, Vimeo, and Power BI.
  • Useful for privacy-compliant embed handling without manually editing each embed.

Post-Installation

After installing, manage services at:
/admin/config/media/orejime-services

Steps:

  1. Add an “Orejime media service” per external provider, or start from the included examples.
  2. Enter the consent key exactly as used in Orejime (format like power-bi or youtube).
  3. Optionally map a media source plugin and/or provider domains.
  4. Check media display formatters (for example oembed) so the module can match and wrap output.

The module works on existing media field output.

Additional Requirements

  • Drupal core modules: Config, Media
  • A working Orejime consent setup on the frontend.

Orejime configuration

Please refer to Orejime documentation.

Here is an example of apps configuration for orejime:

{
    name: "youtube",
    title: "Youtube",
    cookies: ["pk_id", "pk_ses", "_pk_ref", "_pk_cvar"],
    purposes: ["analytics"],
    default: false
},
{
    name: "vimeo",
    title: "Vimeo",
    cookies: ["pk_id", "pk_ses", "_pk_ref", "_pk_cvar"],
    purposes: ["analytics"],
    default: false
},
  • Optional media-related modules for additional embed providers. ex. Media Power BI

Similar projects

orejime_videos provides similar video consent behavior, while orejime_media is more generic through service mapping (consent key + media source + domains) and can handle non-video embeds like Power BI.

Supporting organizations: 

Project information

  • Created by p-neyens on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases