• The theme offers the opportunity to add YT URLs for featured videos, which is something I’m keen to use.

    Since just embedding YT videos is problematic due to the cookies set by Youtube (especially after a new court ruling in Germany today), I’m normally using the WP YouTube Lyte plugin, which works perfectly well for all videos I’m embedding in articles but not for featured videos. Is there an easy way to add the necessary WP Lyte classes to the featured video option?

    I’ve also tried just to use the YT no cookie URL (e.g. https://www.youtube-nocookie.com/embed/ZcdX5FnidmI) but that does not work either I’m afraid.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Theme Author Ben Sibley

    (@bensibley)

    There should be support for the privacy-enhanced embeds already. Can you make sure you’re using the latest versions of both Tracks and Tracks Pro?

    Thread Starter mmirlach

    (@mmirlach)

    I’m using version 1.72 of Tracks and 1.17 of Tracks Pro.
    I don’t see the option, is it something I need to switch on in the settings or do I need to use a specific YT URL?

    Theme Author Ben Sibley

    (@bensibley)

    Okay thanks for letting me know.

    I am testing now and see the privacy-enhanced videos aren’t working the way they’re supposed to. When I use a privacy-enhanced URL, like the one you shared, the video does not show up in the editor. However, the video does show up when I view the page.

    Can you give this a shot and let me know if you see the same result?

    Thread Starter mmirlach

    (@mmirlach)

    I’m afraid it does not show up when I view the page as well.
    I was looking at a few other things and found this:

    https://wpexplorer-themes.com/total/snippets/add-nocookie-to-wordpress-oembeded-youtube-videos/

    I haven’t tried it yet but maybe this could be an option – to add YT links as usual and then use the script via the child theme’s functions.php to convert them to nocookie-URLs?

    Alternatively I was wondering if it’s possible to include some way of WP Youtube Lyte Support for the Featured Videos, so it would be possible to use the plugins settings?

    • This reply was modified 4 years, 6 months ago by mmirlach.
    Thread Starter mmirlach

    (@mmirlach)

    So, as a workaround, I’m using this code via the functions.php, which seems to do the trick and convert standard YT URLs used for the featured image to nocookie URLs – so the video is visible both in the backend and frontend.

    function wj_youtube_nocookie_oembed( $featured_image ) {
        return str_replace( 'youtube.com', 'youtube-nocookie.com', $featured_image );
    }
    
    add_filter( 'ct_tracks_featured_image', 'wj_youtube_nocookie_oembed', 40 );
    Theme Author Ben Sibley

    (@bensibley)

    That code shouldn’t work because the URL structure is different beyond the domain name. The new URL that code creates should produce 404 errors. Maybe there is something else going on since I can see the privacy-enhanced videos working right now on a test site and can’t recreate the same issue on the front-end.

    I will work on a fix for the privacy-enhanced videos not showing up in the back-end and look further into this in the next update for Tracks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Featured videos – no YT cookies or WP YT Lyte integration possible?’ is closed to new replies.