[CinVin] Lazy Load YouTube Videos [Deleted]

CinVin

Member
CinVin submitted a new resource:

[CinVin] Lazy Load YouTube Videos - Lazy Load YouTube in XenForo 2.2.x

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...

Read more about this resource...
 
Noticed the missing webp preview image on all YouTube videos a while ago. Such a shame. They are so much more efficient when you call them in this way. Great addon. S9E addon already offers this functionality so I do not need to install it but this improve page loading so much on pages with tons of embedded YouTube videos.
 
Noticed the missing webp preview image on all YouTube videos a while ago. Such a shame. They are so much more efficient when you call them in this way.
Yeah, it's surprising that with YT being under the Google umbrella that they don't generate the .webp versions of the thumbnail as needed instead of returning a 404. It was also surprising how many if them were bigger than then same thumb in the old . jpg format. According to the Google docs the larger file sizes can occur when the .webp is generated from an already optimized source image.
 
Hi, it would be cool to have the name of the youtube video above the screenhot of the video.
it should be possible to recive the name by youtube api:

JavaScript:
var YoutubeApiKey = "...";
var Id = "ylLzyHk54Z0";
$.get("https://www.googleapis.com/youtube/v3/videos?part=snippet&id=" + Id + "&key=" + YoutubeApiKey, function(data) {alert(data.items[0].snippet.title);});
 
Hello! Any help on #5?
I don't have access to XenPorta to play with. You could try switching from this add-on to to the one from Joshy with the different media codes; I thought I saw someone mention lazy loading YT with that add-on but not sure since I don't use it.
 
Is there any problem with it? It's very useful for improving site speed!
No problems, it's still available....

 
Back
Top Bottom