
Overview
External content is only loaded once the user has given their explicit consent, thereby preventing tracking before any interaction takes place.
The backend text for each provider is edited under “List → Privacy Layer Settings” (the “YouTube”, “Vimeo” and “SoundCloud” tabs):
Supported services
| Service | Type | Player subject to consent | Domain | Features |
|---|---|---|---|---|
| YouTube | Video | YouTube iFrame embedding | youtube-nocookie.com | With enhanced privacy |
| Vimeo | Video | Embed Vimeo player | player.vimeo.com | Standard player |
| SoundCloud | Audio / Sets | SoundCloud widget iframe (same URL as the bundled SoundCloudRenderer would vidply ) | w.soundcloud.com | Visual waveform |
About the SoundCloud renderer
The included VidPly player contains a special
SoundCloudRenderer(src/renderers/SoundCloudRenderer.ts) that integrates the SoundCloud widget API into the standard VidPly controls for play, pause, seek and volume. Inmpc-vidplySoundCloud is normally played via the privacy layer, which loads the SoundCloud widget iframe immediately after consent is given – the widget provides its own user interface. If youvidplyembed a standalone player (orPrivacyLayer.htmlembed it partially), you can choose the renderer-based approach to achieve fully consistent VidPly controls for SoundCloud playback.
How it works
Before clicking
- Overlay of the ‘Play’ button with a poster image
- Privacy policy with a link to the policy
- No external requests
- No tracking scripts loaded
After clicking
- Privacy overlay replaced by the service-specific IFrame
- YouTube → Embedding of a privacy-optimised YouTube iframe
- Vimeo → Embedding of the Vimeo player
- SoundCloud → SoundCloud widget iframe (visual waveform mode)
- Autoplay enabled (instant playback)
- From this point onwards, the privacy policy of the respective service applies
- For SoundCloud, the URL of the widget iframe is the same as the URL used internally by VidPly
SoundCloudRenderer– so the result visible to the user is identical; the only difference is who provides it (privacy layer vs. VidPly renderer).
User experience
Default text (YouTube/Vimeo):
“To play the video, you must click the button. Once you have clicked the button, Google’s privacy policy applies.”
Default text (SoundCloud):
“To activate the widget, you must click the button. Once the button has been clicked, SoundCloud’s privacy policy applies.”
For content editors: Once consent is given, YouTube and Vimeo load their own embed players; SoundCloud loads the widget iframe (waveform UI) rather than VidPly’s unified control bar – unless your website uses the advanced renderer override documented below.
Customisable – All privacy texts, links, headings and button labels can be configured in the backend.
Multilingual support – The privacy settings can be translated for each language.
German translations included – The switch is made automatically based on the language of the TYPO3 website.
Back-end configuration
Configuring settings for the privacy layer
List modules → Privacy layer settings
Create a record to customise the content of the privacy layer for YouTube, Vimeo and SoundCloud:
| Field | Description | Required |
|---|---|---|
| Heading | Optional heading displayed above the privacy policy text | No |
| Introductory text | Text preceding the link to the privacy policy | Yes (use default value) |
| Closing text | Text following the link to the privacy policy | Yes (default value is used) |
| Link to the privacy policy | URL to the page containing the privacy policy | Yes (use default value) |
| Link text | Text for the link to the privacy policy | Yes (default value is used) |
| Button label | Accessible label for the play button | No (use default value) |
These settings support multilingual content via the TYPO3 translation system. Empty fields are automatically reset to the default translations.
Create media records
YouTube/Vimeo:
- Create VidPly media record
- Select the media type ‘YouTube’ or ‘Vimeo’
- Add a video URL or use the TYPO3 Online Media Helper
- Add a poster image (recommended)
- Save
SoundCloud:
- Create a VidPly media record
- Select SoundCloud media type
- Upload track or enter URL:
- Add a cover image (recommended)
- Save
Technical implementation
Files
Partials/VidPly/PrivacyLayer.html- Template for the consent layerJavaScript/PrivacyLayer.js- Delayed loading of iframes (YouTube/Vimeo/SoundCloud widgets)JavaScript/PlaylistInit.js- Handling the privacy layer for playlistsClasses/Service/PrivacySettingsService.php- Retrieving privacy settings from the databaseConfiguration/TCA/tx_mpcvidply_privacy_settings.php- Back-end configurationResources/Public/Css/privacy-layer.css- Styles for the privacy layer- Language files with translations
- (Standalone version of VidPly, optional)
vidply/src/renderers/SoundCloudRenderer.ts- Renderer-based SoundCloud playback, embedded within the VidPly user interface
JavaScript
// Lazy iframe creation (only after click)
button.addEventListener('click', function() {
const service = layer.getAttribute('data-vidply-privacy');
const url = layer.getAttribute('data-vidply-url');
// Create and insert iframe with autoplay
layer.innerHTML = createIframe(service, url);
});
Template logic
<f:if condition="{vidply.serviceType}">
<f:then>
<!-- Privacy layer (YouTube, Vimeo, SoundCloud) -->
<f:render partial="VidPly/PrivacyLayer" />
</f:then>
<f:else>
<!-- VidPly player (video/audio, including HLS/DASH sources) -->
<f:render section="VideoPlayer" />
</f:else>
</f:if>
Features
Data protection
- No external requests before consent is given
- No cookies until user interaction
- GDPR-compliant
- Clear privacy notices
- Centralised backend configuration
User experience
- One-click activation
- Automatic playback (no double-click)
- Visual play button (VidPly-style)
- 16:9 aspect ratio is retained
- Customisable headings, text and links
Technical details
- Lazy iframe generation
- Service-specific embedding URLs
- Multilingual support (EN/DE + backend translations)
- Database-driven configuration
- Works for individual tracks and playlists
- Minimal overhead (~5 KB JS + CSS)
iframe configuration
YouTube
www.youtube-nocookie.com/embed/{ID}
?autoplay=1&rel;=0&modestbranding;=1
- Privacy-optimised domain
- No recommendations for similar videos
- Clean branding
Vimeo
player.vimeo.com/video/{ID}
?autoplay=1&title;=0&byline;=0&portrait;=0
- Clear user interface (no metadata)
- Autoplay enabled
SoundCloud
w.soundcloud.com/player/
?url={URL}&auto;_play=true&visual;=true&hide;_related=true
- Visual waveform (16:9)
- Clear user interface
- Works with tracks and sets/playlists
- The same URL is also used by the standalone VidPly application
SoundCloudRenderer. Withinmpc-vidplythe privacy layer, this iframe is embedded directly (the SoundCloud widget provides its own controls for play, pause and progress). When using the standalone version of VidPlySoundCloudRenderer, the same iframe is embedded, but communication also takes place via the SoundCloud widget API, so that playback is controlled via VidPly’s own controls (play/pause/skip/volume).
Database structure
Table: tx_mpcvidply_privacy_settings
Site-wide configuration of the data protection level stored in the database:
| Column | Type | Description |
|---|---|---|
youtube_headline | varchar(255) | Optional heading for YouTube |
youtube_intro_text | text | Introductory text before the link |
youtube_outro_text | text | Closing text after the link |
youtube_policy_link | varchar(255) | URL of the privacy policy |
youtube_link_text | varchar(255) | Link text |
youtube_button_label | varchar(255) | ‘aria-label’ button |
vimeo_* | (same fields) | Vimeo settings |
soundcloud_* | (same fields) | SoundCloud settings |
sys_language_uid | int | Language ID (0 = default) |
Translations
Translations of the standard language file (fallback)
English:
privacy.activate_intro- “To enable the video...”privacy.activate_intro_widget- “To enable the widget...”privacy.youtube.policy_link- “Google’s Privacy Policy”privacy.vimeo.policy_link- “Vimeo’s Privacy Policy”privacy.soundcloud.policy_link- “SoundCloud’s Privacy Policy”
German:
privacy.activate_intro- “To enable the video...”privacy.activate_intro_widget- “To enable the widget...”privacy.youtube.policy_link- “Google’s Privacy Policy”privacy.vimeo.policy_link- “Vimeo’s Privacy Policy”privacy.soundcloud.policy_link- “SoundCloud’s privacy policy”
Note: The settings in the backend database take precedence over the translations in the language files.
Customisation
Changing the privacy policy text via the backend
Recommended: Use the privacy layer settings in the backend (’List’ module → ’Privacy layer settings’). This allows you to:
- Centralised management
- Multilingual support
- No code changes required
- Easy updates by editors
Modification of the privacy policy text via language files
Editing language files for default values:
<trans-unit id="privacy.activate_intro">
<source>Your custom text</source>
<target>Ihr eigener Text</target>
</trans-unit>
Note: Backend settings take precedence over the translations in the language files.
Custom styling
The styles for the privacy policy section are located in Resources/Public/Css/privacy-layer.css. Override these in your site package:
.vidply-privacy-layer {
/* Your styles */
}
.vidply-privacy-button:hover svg {
transform: scale(1.15);
}
.vidply-privacy-text .h6 {
/* Customize headline styling */
}
Add further services
- Add service to TCA media types
- Add case in
PrivacyLayer.jscreateXyzIframe() - Add translations
- Update the DataProcessor to process the new type
Switch SoundCloud to renderer mode (advanced)
If you want SoundCloud playback to be controlled via VidPly’s native controls rather than via the SoundCloud widget’s user interface:
- Override
Partials/VidPly/PrivacyLayer.htmlso that, once consent has been given for SoundCloud, the partial<audio data-vidply src="{soundcloudUrl}">element is embedded instead of a plain iframe. - Ensure that the VidPly core bundle for SoundCloud media is loaded (by default
mpc-vidplythis is not the case, as external services use the iframe path of the privacy layer). You can achieve this byVidPlyProcessorto$needsVidPlay = trueif SoundCloud is present. - The bundled
SoundCloudRenderer(which is automatically detected for any URL thatsoundcloud.com) then takes control and forwards VidPly’s functions for play, pause, seek, volume and progress bar via the SoundCloud widget API.
This is entirely optional – the default mpc-vidply modes retain the lightweight iframe approach, resulting in less JavaScript being loaded per page.

