futtta / wp-youtube-lyte Goto Github PK
View Code? Open in Web Editor NEWEmbed YouTube on WordPress for optimal performance
Embed YouTube on WordPress for optimal performance
Currently the plugin not supports the YouTube "shorts" video format. You can see an example of this video format here:
https://www.youtube.com/shorts/RN29WKHeMDs
I think that implementing the support for this video format is simple because you still have the video ID into the URL. Thank you!
wp: 5.7.2
wp-lyte: 1.7.16
seems the fix in 593566c is incomplete.
Why does this plugin need to do that anyway?
I just set up the plugin on a site, and found that activating local thumbnails actually slowed down the site, as the response from lyteThumbs.php (with a primed cache) took significantly longer than loading it from YT (even including the connection overhead). The site is on a slow, shared hosting plan.
A way to speed this up could be as follows (for sites with mod_rewrite support):
/wp-content/plugins/wp-youtube-lyte/cache/[video-id].jpg
So it looks like short urls don't work.
e.g.
See this page
https://www.xeroshoes.eu/short-url-test/
The video url is: https://youtu.be/yPK34A3Lk7o
I'm already using this filter
https://blog.futtta.be/2021/02/13/fix-for-elementor-3-1-youtube-not-lyte-anymore/
When I switch to the long form youtube url the video works fine - it's just shortened version
@softmanro a LYTE-user is using your lazyload feature (see original post on the wordpress.org forum) and seems to be running into an issue with the image not being visible;
There is a problem with mobile thumbnails. See here https://imgur.com/a/ytPulsV They are not being loaded.
If I remove the code add_filter( ‘lyte_use_internal_lazyloader’, ‘__return_true’); then it worked again. Once, reloading the page again did not show it for the second time. But it is connected to the lazy load feature. I checked the code and see here https://imgur.com/a/ArL7JZ2 The image is there but you force background image: none so it’s hidden behind the background…
Edit: Yeah, it’s because of the lazy load. I just deleted the cache. Right now the thumbnails are loaded but it’s immediately after the page load and not lazy loaded. Could you please fix it so we can use the lazy load feature but having the thumbnails working fine?
any idea what is happening here?
I use it together with tailwindcss on a page and ran into a problem with Lyte
creating the .hidden class in inline styles. This overrides the use of .hidden
from tailwindcss, exspecially when using it with responsive options like
class="hidden md:block" - in tailwindcss this will hide on all smaller
displays and display in larger ones. But the inline definition from Lyte will
override it so hidden will always be display: none.
Is there a chance that you might rename the classname of hidden to maybe
.lyte-hidden in future versions?
mail Thomas from Leipzig;
Okay, your are right "rel=0" is the correct parameter, for what I like.
But it don't works, it's useless, when you use the parameter "hd=0" in the same call.I think, some parameters in your call ist deprecated since 7 years or more: egm + hd + wmode.
cfr. https://developers.google.com/youtube/player_parameters#Deprecated_Parameters
find a way to either make those LYTE or skip them, now the live-stream player is broken.
see https://wordpress.org/support/topic/not-work-embed-channel-code/
Hello,
Now that WP supports webP images, would it be possible to save video thumbnails in this format? Or is there already a way to configure the plugin to do this?
Browser support for webP now looks good but the plugin could still generate jpegs too for full compatibility.
Hello,
Google Tag Manager has easy built-in video tracking that send events when videos start, pause, etc. However, this tracking does not work when videos are served from youtube-nocookie.com
(source). Google Analytics 4 also its own built-in video tracking events, but these are also broken when videos are served from youtube-nocookie.com
.
It is possible to create a setting option to serve videos from either youtube.com
or youtube-nocookie.com
?
Thank you.
Hi,
I realized that the cache stopped working (and falling back to the youtube 301-redirection) because each time I clear my caches, it deletes the lyteCache-Folder as well - and it isn't re-created automatically. This seems to come from
It seems to create the folder only if lyte_filter_local_thumb_doublecheck
is enabled? Can you check that condition please?
(I am using the plugin to implement GDPR restrictions so simply redirecting to YouTube is actually worse than showing an error message or something, then at least I would have realised earlier that it was redirecting... Can I send you a pull request that disables lyte_thumb_fallback() via a filter, similar to lyte_filter_local_thumb_doublecheck
?)
When embedding a YT video with Gutenberg, and having this plug-in enabled, the video is always only aligned according to the plugin settings, which is very limiting.
It would be nice if the plug-in applied the alignment-values from the Gutenberg block, and also to actually forward additional CSS classes set for the Gutenberg block to the HTML renderer. This would allow me to let text flow around videos (which already works for normal images).
Thank you.
I don't intend on using an API key, but this notification is permanently fixed on all dashboard sections.
(function lyte_admin_nag_apikey()
)
Can a dismiss option be added?
I'm not versed in PHP, but I've been looking into the code to see how I'd go about it to make a pull request. Found the function on options.php
. I think I know how to add the Dismiss button and the conditional logic to not display the message, but I'm a bit lost on how I'd go about saving the option state.
If you point me in the right direction I'll get on it!
Hi! Is there a way to disable plugin in feeds?
As proposed by James;
I have a feature request I hope you can implement: Could you add an
"end" attribute to the shortcode - eg,[lyte id="_SQkWbRublY" start="20" end="40" /]
?
see https://developers.google.com/youtube/player_parameters#end
I noticed some issues with the responsive behaviour of my post pages after installing this plugin. Note scrollbars:
This issue is not present if no WP YouTube Lyte embeds on the page. Inspecting the HTML I can see a fixed pixel width of 640px is added inline, twice:
Disabling these two inline widths like my screenshot seems to have no effect on the responsive behaviour of the thumbnail, but does fix the responsive behaviour of my theme:
Can these two fixed inline widths be removed? Or set to max-width
instead perhaps (I understand you support different player sizes).
The regex patterns in lyte_prepare() do not account for css classes core added to figcaption.
Replacing <figcaption>
in both patterns with <figcaption.*>
fixes this.
So, I have a blog that I have not done much with for a while and came back to it recently and get this error when testing the key:
Your API key might be OK, but the API call did not succeed or the response was not entirely expected. Technical error: forbidden
I have verified that the API key is correct and active. I'm not sure if this error is a problem or not, but am reporting it in case it is since I can't seem to find any information about this error. Maybe something changed?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.