Discourse lazyYT

NOTE: This plugin is included with core, you do not need to install it.

Location: https://github.com/discourse/discourse/tree/master/plugins/lazy-yt

Author: @techAPJ

Lazy load YouTube videos plugin for Discourse, highly inspired by the lazyYT jQuery plugin.



Before I understood the underlying concept behind this, I was always confused that youtube links wouldn’t play until I clicked them twice.

It’s currently 1 click to load the youtube player, and 1 click to play.

It would make more sense to me if it immediately played after loading the player (one click).

It looks like the autoplay parameter would do it.


I’m on Chrome desktop 37.0.2062.102 (Official Build 291558) unknown-m
(unknown-m is displayed due to CR-407204. It is in fact a stable build.)

It turns out one of my extensions was causing it. I’m narrowing down which one is doing it and I’ll report it to them if necessary.


Are you trying this on mobile device? This is only the case with mobile device, see:

autoplay parameter is already being passed, and the video loads immediately after one click, on Desktop/Laptop.

Anyone having issues with YouTube/onebox embeds loading on the latest version of Discourse? v1.6.0.beta5 +35

Looks good on try.discourse: