[CinVin] Lazy Load YouTube Videos

XF2 Addons [CinVin] Lazy Load YouTube Videos 1.1.0
Defers loading embedded YouTube videos until the user clicks on the play button.

Compatible versions
2.2

This is a small add-on that defers loading embedded YouTube videos until the user clicks on the play button.

A preview image is shown as a placeholder with the familiar YouTube 'play' button on top. The video is not loaded until the play button is clicked. The image has the 'lazy' property set for browsers that recognize it.

For threads with a lot of embedded YouTube videos, such as the "The Amazing Emporium of Wondrous Tunes (aka: What are you listening to?)" thread at Cameraderie, this allows the thread to load faster and helps users browsing on slower internet connections and/or older devices.

Please note: On some browsers, such as Chrome for Android devices, the video will not auto-play after being clicked. It will load after clicking the 'play' button but the user must then click the 'play' button of the newly loaded video. This is a restriction of the browser and can not be overridden.

1635701151291.png


As of version 1.1.0 there are two new options available in the ACP => System and Performance Settings.

The option Use 'Youtube-Nocookie' Domain When Playing Videos will use the domain "youtube-nocookie.com" instead of the default "youtube.com" when the videos are loaded. This is part of Google's YouTube Privacy-Enhanced Mode.

The option Use YouTube Webp Preview Images will use .webp preview images instead of the default .jpg images. Important to note... not all videos have .webp preview images! Turning this option may result in some videos, especially older ones, having no preview image shown. From our testing, some of the YT .webp images are actually bigger than the .jpg images! Because of that, and that our sites have a lot of older videos, we don't have this option enabled but left it available for anybody that might want to use use .webp everywhere possible.

1635700920743.png
FateKid
Author FateKid
Level
11
5,910 pts
1.1.0 Version
0 Downloads
324 Views
Published
Updated
0.00 star(s) 0 ratings Average Rating (0)

More files from FateKid

Customize Your XenForo 2 Community

[CinVin] Lazy Load YouTube Videos provides ultimate customization to your XenForo 2 community website! Enjoy powerful features that make your site stand out. Combine this add-on with XenForo 2 styles from our site and kickstart your online community now.

Why Download Our XenForo 2 Add-ons?

  • Easily enhance the quality of your XenForo online community.
  • Expand your XenForo 2 functionality with thousands of unique options.
  • Create unbelieveable user-experiences with advanced features.

Explore Other Resources

Are you looking for something different? Explore our thousands of unique and special XenForo 2 add-ons, available to download right now. FateKid shared this wonderful resource to you for free, so remember to share your appreciation by liking the resource and reviewing it.

Get started today and make your next project truly unique.

Top Bottom