• Resolved hmijail

    (@hmijail)


    I use CookieYes (free level) for my cookie banner / blocker. I wanted to block my blog’s readers from clicking through WP Youtube Lyte’s cached placeholders unless they accepted cookies (in case Youtube pushes some), and I managed to configure CookieYes so that it blocks the loading of the wp-youtube-lyte/lyte/lyte-min script. It works!

    But now it actually it’s a bit too far: instead of the videos’ placeholders now I have grey blocks (with the video’s titles, I guess courtesy of the plugin and YT API). Which is a pity, because as we know one of the advantages of genius WP Youtube Lyte is that it caches the YT façades, so we could display them without ever contacting YT.

    So my question is, is it possible to display everything but just block the activation of the videos unless a cookie has been set? Am I missing something, is this a feature request…?

    • This topic was modified 4 months, 2 weeks ago by hmijail. Reason: Completed the title

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    afraid that currently indeed is not possible hmijail; lyte.min.js is responsible for both the loading of the thumbnail and the activation of the video.

    hope this clarifies,
    frank

    Thread Starter hmijail

    (@hmijail)

    Aha, thank you for confirming.

    OK, so in case you feel like implementing a new feature ;), it’d be great to ignore clicks if a cookie isn’t present with a configurable name and contents. (e.g., CookieYes sets a cookie with the permissions granted by the user; so Lyte could check that the cookie exists and contains a substring).

    Even better if, while the cookie is missing, a configurable text was overlayed; the text could change on an event triggered by the cookie banner acceptance.

    Or maybe if the cookie is missing the click could just open the youtube video in either the current tab or a new one…

    In any case, thank you for your work! Mozilla donor here 😉

    Thread Starter hmijail

    (@hmijail)

    Just thought of another alternative that probably would be simpler to implement and still would allow to build fixes on top: would it be possible to have an option (e.g. a shortcode attribute or editor checkbox) so that Lyte renders the façade just like it does now, but doesn’t react to clicks?

    If I developed that, would you accept a Pull Request? I’m not a JS dev, but sounds simple enough that I could try.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.