[nodebb-plugin-youtube] Youtube Embed Plugin
-
@torybriggs said:
I've used a small jQuery library called FitVids.js on projects in the pass and it has worked great.
"ooooOOOOOOOOOOOOOOOoooooo" is what I said, when I resized my browser on that FitVids page...
-
@julian said:
@torybriggs said:
I've used a small jQuery library called FitVids.js on projects in the pass and it has worked great.
"ooooOOOOOOOOOOOOOOOoooooo" is what I said, when I resized my browser on that FitVids page...
Right? It was so damn graceful.
@psychobunny coughcough this is needed muchly.
-
Is it possible to change this plugin so that instead of automatically embedding the video it will require some sort of enable characters?
Sort of like BBcode?So
[yt]youtubevidelink[yt]
?
or something like the markdown image function![youtube](youtubelink)
?We heavily rely on the shoutbox plugin and when someone postes a youtube link it embeds the video and it takes up quite a lot of space. It could be something added to the admin cp to automatically embed or require some sort of enable code.
Or is there any way we can limit the size of the embed?
-
or something like the markdown image function
![youtube](youtubelink)
?I like this, makes sense. IMO I'm not going to bother updating this because what we really should do is make a global embed plugin one that handles all the major video hosting sites
-
@psychobunny Something like embed.ly embed API would be fantastic. Just without all the advertising and re-embed icons etc etc.
-
Great plugin, thanks a lot
-
@psychobunny Hey buddy, I've started working on a youtube-lite plugin if you're interested in contributing, video heavy threads crash my browser due to the number of iFrames being loaded. So I'm working on integrating lazyYT, which only fires the iFrame when it's required, until then it just displays the default image of the video and a play button. I've got as far as displaying the thumbnails, but there's something wrong with it then loading the video, the iFrame code gets mangled. So fails to load.
If anyone wants to help out with this, it's https://github.com/a5mith/nodebb-plugin-youtube-lite (Don't use in live environment, it doesn't work.)
I've noticed that it requires some code be added into the body, is this something that can be done easily via the plugin? Or would it be easier to get people to add it to the custom JS?
-
I've noticed that it requires some code be added into the body, is this something that can be done easily via the plugin? Or would it be easier to get people to add it to the custom JS?
Try checking this plugin out for an example on how to embed client-side scripts in your plugins
-
@psychobunny Thanks dude, once I've worked out why the iFrame code is getting mangled, I'll add that in.
-
Ok, I'm officially at a loss with this... Not only is it mangling the iFrame, it's changing the video ID into all lower case, so the videos don't actually work.
I don't understand how it goes from
$el.on('click', function (e) { e.preventDefault(); if (!$el.hasClass('lazyYT-video-loaded') && $el.hasClass('lazyYT-image-loaded')) { $el.html('<iframe width="' + width + '" height="' + height + '" src="//www.youtube.com/embed/"' + id + '?autoplay=1&' + youtubeParameters + '"></iframe>') .removeClass('lazyYT-image-loaded') .addClass('lazyYT-video-loaded'); } });
To being output as
<iframe width="640" height="360" yuobzwf0aws?autoplay="1&"" src="//www.youtube.com/embed/"></iframe>
Sense, it doesn't make it.