Preventing player to show until cookie consent is given

Last Updated 22 days ago

If you are using a cookie consent manager you can block the embed code iframe from running until user accepts marketing cookies which are set by Screen9 player and Google Analytics and Ads (if enabled on the account).

Below is an example of how to do it with a Klaro tool.

Copy and paste the embed code as described in the embed code article.

<iframe src="https://api.screen9.com/embed/91Pj4RknqMR_1ZOv1PFKBg" width="800" height="342" allowfullscreen allow="autoplay; encrypted-media" style="border:0;"></iframe>

Replace the src attribute with data-src and add a data-name attribute.

<iframe data-src="https://api.screen9.com/embed/91Pj4RknqMR_1ZOv1PFKBg" width="800" height="342" allowfullscreen allow="autoplay; encrypted-media" data-name="demo-screen9" style="border:0;"></iframe>

Create a service with the same name in the Klaro config file.

var klaroConfig = {
    acceptAll: true,
    services: [
        {
            purposes: ['marketing'],
            name: "demo-screen9",
            contextualConsentOnly: true,
        }
    ]
}

The player will not be shown then and instead a placeholder will be shown.

image

This could also be configured in the cookie consent panel.

image

Once the consent is made, the player shows the video.

image
This website relies on cookies to function, but no personal data is ever stored in the cookies.
OK

Loading ...