Blocking iframes (twitter/youtube...)
Many websites use iframes to display videos, tweets, etc. It is therefore necessary to ask users for their consent before loading the content of the iframe.
Examples of services using iframes
Video players: YouTube, Vimeo, Dailymotion, etc.
Social media: Twitter, Facebook, etc.
Podcast players.
Audio players.
Method 1: Using the SDK
The SDK blocks the iframes of the page that match a selector and displays a customizable blocking message instead:

A click on the button of the message automatically records consent to the service and loads the iframe. If the visitor later withdraws consent to this service, the iframe is blocked again. The message offers an acceptance button only.
An example with YouTube video player iframes:
The iframeBlock options are:
selector
CSS selector of the iframes to block.
service
Identifier (slug) of the service whose consent unblocks the iframe.
body
HTML text of the blocking message.
buttonLabel
Label of the acceptance button.
buttonClass
CSS classes of the button.
footer
HTML text displayed under the button.
Method 2: Manual implementation
You can also implement your own logic:
Last updated
Was this helpful?