Issue with responsive display in widget areas
-
Hi,
First of all, thank you for the great plugin – WP YouTube Lyte works really well overall for my need, ie to customize the play button, show only my channel’s related videos and get back the “modest branding” option!
However, I’ve run into an issue:
When I use the shortcode inside WordPress widget areas (like sidebars or homepage widget zones), the videos don’t display at all in responsive mode, especially on mobile devices. The same shortcode works fine in regular pages or posts.I’ve tried adjusting the CSS, and even added JavaScript to force responsiveness, but the issue seems to come from how the plugin handles video containers in widget contexts. I’ve also disabled my cache and all custom CSS, so it’s not that.
Would it be possible to improve compatibility with widget areas in a future update, or perhaps provide a recommended workaround?
Thanks again for your work and support!
Best regards,
RP
-
can you post the URL to an example where things are wrong erpol53 ?
Hi, thanks for the quick response. It’s a live site, so I can’t really post pages with videos that show blank on phones 🙂
I’ll try to set up something on my test site for you to look at. It’ll give me an opportunity to check if it’s some other interaction that’s causing this.
RP
-
This reply was modified 4 months, 2 weeks ago by
Roger.
Hi,
Thanks for bearing with me! I started by disabling 90% of the plugins on my main site, to check if there wasn’t some conflict there, but apparently that’s not it.
So I reproduced the issue on my test site, that you can check out here: http://s263012258.onlinehome.fr/
I disabled practically all the plugins. The theme is not a default one, but it’s different from the one on the main site. The homepage has a widgetized area, where I put the same video twice: Once in an iframe with some CSS, the other in the Lyte shortcode with minimal CSS (just the button). I have a valid Google API, which works (tested)
There’s also another problem that I see at large resolutions, it’s that the Lyte cover image is pixellated, although I chose the largest dimension for the video, 960×720 ?
Anyway, when you see the 2 videos’ still covers you’ll see why I need your plugin! 😀
There you are, I really hope you can solve this!
Thanks and best regards,
RP
afraid the site is not accessible, I only see “This test site does not currently accept external visitors” RP?
Oops! I’m terribly sorry, I block the site normally and forgot to open it up.
Fixed now. Just scroll down the homepage, you’ll see the 2 videos.
Sorry again, and thanks!
RP
OK, so does this also happen when the “cache thumbnails locally” option is active?
No, you’re right – it doesn’t do this when the thumbnail is cached locally, thanks!
The thumbnail is still in low quality though, but it solves my issue, thank you! I’ll close the site again.
RP
-
This reply was modified 4 months, 2 weeks ago by
Roger.
the reason for the vid not showing when the local thumbnail is not cached, is that in that case LYTE when on a mobile view will load the full YT video soon after initializing and it seems like the hight of the video is 0px in that case. I was able to change that through CSS while experimenting with your site, so if you prefer not to cache locally you could do so with some CSS tweaks 🙂
best,
frankNo need for additional Css, caching the thumbnail is not an issue. I could use a higher res image though, this one seems very small!
ah, the widget logic indeed uses
hqdefault.jpgthumbnail by default (which is OK for ‘normal’ widgets which tend to be small), you could use thelyte_filter_widget_thumbfilter to replace that withmaxresdefault.jpg? 🙂Thanks for the suggestion, I’ll see if it’s practical to do this.
For a future update, you might consider adding some logic in the plugin thumbnail query to start with ‘maxres’ (1280), then fallback to ‘standard’ (640) if not present, then ‘high’ (320, weird naming!). This would ensure getings always the highest available res thumbnail that YT has.
Thanks,
RP -
This reply was modified 4 months, 2 weeks ago by
You must be logged in to reply to this topic.