Part of the Orejime ecosystem · 4 projects
This module ensures that embedded external media, like YouTube or Power BI, is only loaded after a user gives cookie consent through Orejime. It replaces embeds with a placeholder until consent is granted, and will revert to the placeholder if consent is withdrawn. This provides a privacy-compliant way to handle embedded content without manual configuration for each instance.
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:
- Add an “Orejime media service” per external provider, or start from the included examples.
- Enter the consent key exactly as used in Orejime (format like power-bi or youtube).
- Optionally map a media source plugin and/or provider domains.
- 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
},
Recommended modules/libraries
- 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.
Ask your assistant about Orejime media
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
- config Drupal core
- media Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Orejime ecosystem
Most installed first