jacmaes Posted April 22, 2020 Share Posted April 22, 2020 This is my very first module, and I'm sure it needs a lot of improvements, so I'd like to get some feedback. I've kept it as simple as possible to fit my basic needs. Adapted from Ryan Cramer's TextformatterVideoEmbed, this TextFormatter module replaces plain YouTube links pasted in a CKEditor field with Paul Irish's blazing fast Lite YouTube Embed script: https://github.com/jacmaes/TextformatterLiteYouTubeEmbed Why? The Lite YouTube Embed script is indeed a lot faster than the standard iframe embed. The difference is pretty spectacular when you need to embed a series of videos. It's also more private as it uses youtube-nocookie.com (so no need for a cookie banner). 12 Link to comment Share on other sites More sharing options...
Robin S Posted April 22, 2020 Share Posted April 22, 2020 Sweet! How about integrating lite-vimeo-embed too? Then the module could be a drop-in replacement for TextformatterVideoEmbed. ? 3 Link to comment Share on other sites More sharing options...
OllieMackJames Posted April 23, 2020 Share Posted April 23, 2020 9 hours ago, Robin S said: Sweet! How about integrating lite-vimeo-embed too? Then the module could be a drop-in replacement for TextformatterVideoEmbed. ? I use vimeo, so would be very happy with lite-vimeo-embed plugin 1 Link to comment Share on other sites More sharing options...
jacmaes Posted April 23, 2020 Author Share Posted April 23, 2020 Thanks guys. I'll see what I can do this weekend, if I finally manage to have some free time. PS: although I built the following page before this module, it does use the lite-youtube-embed script, so you can check how it looks and how fast the page loads with 14 videos: https://www.spainculture.us/digital-projects/14-days-14-artists/ 2 Link to comment Share on other sites More sharing options...
gornycreative Posted April 26, 2023 Share Posted April 26, 2023 I have been digging into the oembed fields/essence and this as well. First exposure to this feature and so cool to see where it is used. If you run Plex, for example, and you use youtube-dl to grab audio from a music video, the comment on the exported audio file includes the youtube URL and when you load the music file into Plex, Plex pulls the oembed data and shows you the video description for the song! I don't know if this is still being worked on, but I like this implementation for youtube so I will fork and add lite-vimeo-embed support if necessary. Link to comment Share on other sites More sharing options...
millipedia Posted April 27, 2023 Share Posted April 27, 2023 (edited) Slightly embarrassed to mention it given the code is currently 90% todo statements, but I did expand this module for a project I did a few months back to include Vimeo. You can grab the code from https://github.com/millipedia/TextformatterLiteVideoEmbed and you can see a test page here https://millipedia.com/video-test/ It definitely needs a lot of tidying up, but I have it running on a couple of live sites at the moment and it hasn't destroyed them yet (ymmv). I'll try and find some time to polish up the code as soon as I can. Edited May 9, 2023 by millipedia Fixing broken link to github repository 1 Link to comment Share on other sites More sharing options...
Gideon So Posted April 28, 2023 Share Posted April 28, 2023 Hi @millipedia This is much faster than Ryan's one. One thing though, line 13, 14 of TextformatterLiteVideoEmbed.js should be modified as the following. Otherwise it doesn't work in pages other than the home page. const LiteYTEmbed = await import(tflve_script_path + '/lite-youtube.js'); const LiteVimeoEmbed = await import(tflve_script_path + '/lite-vimeo.js'); Gideon Link to comment Share on other sites More sharing options...
millipedia Posted April 28, 2023 Share Posted April 28, 2023 52 minutes ago, Gideon So said: One thing though, line 13, 14 of TextformatterLiteVideoEmbed.js should be modified as the following. Otherwise it doesn't work in pages other than the home page. const LiteYTEmbed = await import(tflve_script_path + '/lite-youtube.js'); const LiteVimeoEmbed = await import(tflve_script_path + '/lite-vimeo.js'); Hmm - it works for me on several sites at different page depths - which webserver are you using? But you're right that I don't really think we need that leading period, and taking it out seems to be fine, so I've made those changes as suggested. Thanks for letting me know. 1 Link to comment Share on other sites More sharing options...
Fuzen Posted May 27, 2023 Share Posted May 27, 2023 On 4/27/2023 at 12:39 PM, millipedia said: Slightly embarrassed to mention it given the code is currently 90% todo statements, but I did expand this module for a project I did a few months back to include Vimeo. You can grab the code from https://github.com/millipedia/TextformatterLiteVideoEmbed and you can see a test page here https://millipedia.com/video-test/ It definitely needs a lot of tidying up, but I have it running on a couple of live sites at the moment and it hasn't destroyed them yet (ymmv). I'll try and find some time to polish up the code as soon as I can. @millipedia I’d love to see your TextformatterLiteVideoEmbed have its own thread in the Forum. Maybe you an kick it off? 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now