Discourse lazyYT

official

(Arpit Jalan) #1

NOTE

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

Location: discourse/plugins/lazyYT at master 路 discourse/discourse 路 GitHub

Author: @techAPJ

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

Demo:


LazyYT like lazy loading for soundcloud
(Zane Beckman) #2

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

It鈥檚 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.

EDIT:

I鈥檓 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鈥檓 narrowing down which one is doing it and I鈥檒l report it to them if necessary.


(Arpit Jalan) #3

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.


(Dylan Burkhardt) #4

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


(Arpit Jalan) #5

Looks good on try.discourse: