[CinVin] Lazy Load YouTube Videos for Xenforo 2

XenForo [CinVin] Lazy Load YouTube Videos for Xenforo 2 1.1.0

No permission to download

Kevin

Code Monkey
Staff member
Kevin submitted a new resource:

Lazy Load YouTube Videos for Xenforo 2 - Lazy Load YouTube in XenForo

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.

For threads with a lot of embedded YouTube videos, such as the "What are you listening to?" thread here at Alien Soup, this allows the thread to...

Read more about this resource...
 
Hi @Kevin
thanks to make this addon, make my thread faster with lot of youtube video :smiley:
how to change width/height?
iam use this code on extra.less but not work with this addon enable

.bbMediaWrapper { width: 400px; }

thank you.
 
Hi @Kevin
thanks to make this addon, make my thread faster with lot of youtube video :smiley:
how to change width/height?
iam use this code on extra.less but not work with this addon enable

.bbMediaWrapper { width: 400px; }

thank you.
I'll update it this weekend to respect the bbMediaWrapper class instead of using it's own class. For use here I like a 100% width I left it in there. It's Friday night now local time, I'll post an update either Saturday or Sunday night.
 
Hi @Kevin
Is this addon compatible with Xenforo 2.1?
thank you.
It should be but, after updating the site last night to 2.1.0 I couldn't help but notice little things like the ACP icon not appearing (because FA5 is now used instead of FA4).

I'll put out an update, likely next weekend, to update it to be friendly with 2.1.0 but in the interim it should be working fine. If you notice anything with it on your site let me now and I'll take care of it. 🙂
 
It should be but, after updating the site last night to 2.1.0 I couldn't help but notice little things like the ACP icon not appearing (because FA5 is now used instead of FA4).

I'll put out an update, likely next weekend, to update it to be friendly with 2.1.0 but in the interim it should be working fine. If you notice anything with it on your site let me now and I'll take care of it. 🙂
I take it back, it's giving me some issues tonight when I add a YT URL and then try to do a preview.

I'm in the midst of migrating a large site from XF 1.5.x to 2.1.x this week so it might be at least a few days or till the weekend before I have a chance to take a look. :(
 
but notice little things like the ACP icon not appearing (because FA5 is now used instead of FA4).
yes, same here
13896
 
What kinds of problems are you guys running into? It *seems* to be working on XF 2.1.x, just need the ACP icons cleaned up.
 
Kevin updated Lazy Load YouTube Videos for Xenforo 2 with a new update entry:

Tweaked for XF 2.1.x

This version requires XF 2.1.0 or above in order to be installed.
  • Fixed to use the minified version of the javascript file.
  • Changed iframe code to allow for autoplay complying with Google's updated policies on embedded media.
  • Tweaked the JS just a bit.
  • Updated the ACP icon, title, etc. to be consistent with other "CinVin" releases.
The current version of this add-on is always installed here at Alien Soup. Check our "What are you listening to?"...

Read the rest of this update entry...
 
Kevin updated Lazy Load YouTube Videos for Xenforo 2 with a new update entry:

CSS Tweaked for large resolutions

The CSS has been tweaked a bit for handling large resolutions better. Over at the Cameraderie photography forum we ran into the situation where the preview image of the video was not being properly centered in the middle of the frame on devices running really large resolutions. Smaller resolutions looked OK, only high resolutions were off.

While in there the CSS was tweaked a little to get rid of some unnecessary settings.

NOTE: All of the HTML...

Read the rest of this update entry...
 
FYI - With XF 2.2 looks like there is an issue with the new 'preview' mode of the editor. When clicking the preview button the play icon is shown as expected but when clicking on it the object is not being activated to load the video. After saving the post it works as before so it's just the preview mode that is an issue at the moment.

It's on my list to take a look at.
 
Kevin updated CinVin: Lazy Load YouTube Videos for Xenforo 2 with a new update entry:

1.0.5 - Updated attributes and fix 'preview'

Since the release of XF 2.2 it has been bugging me that the editor 'preview' mode wasn't showing the YT video preview with this add-on. This update should fix that.

With the above in mind the target version of XF that is supported is now 2.2.x and above. As a rule of thumb I'll always target the current version of XF.

The IMG tag used has been updated a bit to have a generic alt attribute value of "XenForo {ID}" where {ID} is the YT value and to include...

Read the rest of this update entry...
 
Kevin updated CinVin: Lazy Load YouTube Videos for Xenforo 2 with a new update entry:

1.0.6 - Tweaked CSS for XFMG

Slight update to tweak the cinvin_lazyloadyoutube.less CSS for XFMG so that the lazy loaded YT videos visually appear the same as stock XFMG embedded YT videos.
  • Updated so that the preview image is now the full width of the XFMG media container instead of actual size.
  • Updated so that the 'fancy box' embedded video is responsive size instead of absolute.
If you're not using XFMG then you can skip this update.

Read the rest of this update entry...
 
Back
Top