Small responsive YouTube embeds in chrome?

56 views
Skip to first unread message

Matt Meade

unread,
Jan 3, 2014, 9:32:04 AM1/3/14
to WPGR

I run a wp install where the main content is in two responsive css columns, so it can get more narrow than your standard YouTube embed.

I have tried default WordPress embed, and two widgets (fluid video embeds, and responsive video embeds).

In all cases, when the width gets small enough, chrome browser only displays a black box instead of the video. Other browsers still show the video, but not chrome.

I have tested this from my work pc and my home pc but I suppose it's possible that they show up fine for some people, reports?

Does anyone have a solution that does what I am looking for? (Meaning not just "make your columns wider!" or "link to the video instead of embedding!")

I would like video embedded and showing up even in chrome at these sizes of possible.

Example: http://www.womensselfdefense.info/dev/2013/12/test-video/

Topher

unread,
Jan 3, 2014, 9:34:56 AM1/3/14
to wp...@googlegroups.com
I never get the bad behaviour you describe in Chrome. Are you able to
check other machines and see if it's you?

Brian Richards

unread,
Jan 3, 2014, 9:50:55 AM1/3/14
to wp...@googlegroups.com
When I initially loaded the page I saw the video as just a black box, but the moment I changed the browser width enough to hit a CSS breakpoint I saw the properly embedded and responsive video.

If you're unsatisfied with the solutions you've tried so far, take this code for a spin: https://gist.github.com/brichards/8239011

The first block would go into your theme's functions.php file (or a plugin, if you wanted to create one), while the second block would go into your theme's style.css (or, again, a stylesheet loaded by a plugin).

This is something I wrote for myself so that every video I embed via oembed would be automatically responsive for http://WPSessions.com – you can see it in work on the homepage, in fact. Any video you're manually embedding (pasting the full iframe embed code, rather than just the video's URL) you'll need to manually wrap in <div class="video-wrapper"></div>.

Hope this helps!

Grace and Peace,
Brian Richards



--
You received this message because you are subscribed to the Google Groups "WordPress Grand Rapids (WPGR)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wpgr+uns...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Chad Warner

unread,
Jan 3, 2014, 10:05:16 AM1/3/14
to wp...@googlegroups.com
I see the black box upon initial page load (Chrome on Win 7 x64). When I resize the browser and get the content into a single column, the video shows. If Brian's code doesn't work, you could also try the FitVids for WordPress plugin. I'd be surprised if it worked better than Fluid Video Embeds or Responsive Video Embeds, but it's worth trying.

If you find a solution, please let us know what worked!

Chad Warner | OptimWise | Websites that Empower Small Businesses | http://optimwise.com

Matt Meade

unread,
Jan 3, 2014, 11:02:54 AM1/3/14
to WPGR
Topher:
I tried it at work and home and got the same result. Did you try my link? Did it work for you in chrome?

Chad and Brian: I get the same. It shows up when page resizing gives it enough width, but disappears when too narrow. Also I can get it to show up by clicking the black box and playing the video. But initially, black.

I will try the possible solutions you have posted, thanks all!

Matt Meade

unread,
Jan 3, 2014, 11:07:28 AM1/3/14
to WPGR
Also worth mentioning I guess, is that this is a child theme I wrote using the parent: twentytwelve
So not sure if the problem is youtube, chrome, my code, twentytwelve code, or the way any of those four factors play together.

-M

Luke Rumley

unread,
Jan 3, 2014, 11:17:32 AM1/3/14
to wp...@googlegroups.com
Keeping in mind that most people won't be resizing their desktop browsers, I tried it in Chrome on my iPhone and it worked fine on first load. FWIW.

Luke Rumley
616.425.8815


On Fri, Jan 3, 2014 at 10:05 AM, Chad Warner <ch...@optimwise.com> wrote:

Matt Meade

unread,
Jan 3, 2014, 11:28:47 AM1/3/14
to WPGR

Unfortunately it's the default desktop size that sucks. It actually shows wider on mobile because it's one column instead of two :-(

Resizing the desktop smaller to make it change to single-column is what makes it work, not what breaks it :-(

I know that's slightly backwards to show wider content on smaller screens but I am trying to just trust the graphic artists original two column layout for full desktop size instead of saying "sorry about your layout but I can't code it" :-(

Matt Meade

unread,
Jan 10, 2014, 11:54:17 AM1/10/14
to WPGR
Haven't had a chance to try the suggestions here yet but I noticed something weird about this.

Seems to display fine on the blog page showing multiple posts.

Topher

unread,
Jan 10, 2014, 12:03:06 PM1/10/14
to wp...@googlegroups.com
Both work fine for me in Chrome.


On 01/10/2014 11:54 AM, Matt Meade wrote:
Haven't had a chance to try the suggestions here yet but I noticed something weird about this.

Seems to display fine on the blog page showing multiple posts.
On Fri, Jan 3, 2014 at 11:28 AM, Matt Meade <ring...@gmail.com> wrote:

Unfortunately it's the default desktop size that sucks. It actually shows wider on mobile because it's one column instead of two :-(

Resizing the desktop smaller to make it change to single-column is what makes it work, not what breaks it :-(

I know that's slightly backwards to show wider content on smaller screens but I am trying to just trust the graphic artists original two column layout for full desktop size instead of saying "sorry about your layout but I can't code it" :-(

On Jan 3, 2014 11:17 AM, "Luke Rumley" <lu...@rumleydesign.com> wrote:
Keeping in mind that most people won't be resizing their desktop browsers, I tried it in Chrome on my iPhone and it worked fine on first load. FWIW.

Luke Rumley
616.425.8815


On Fri, Jan 3, 2014 at 10:05 AM, Chad Warner <ch...@optimwise.com> wrote:

I see the black box upon initial page load (Chrome on Win 7 x64). When I resize the browser and get the content into a single column, the video shows. If Brian's code doesn't work, you could also try the FitVids for WordPress plugin. I'd be surprised if it worked better than Fluid Video Embeds or Responsive Video Embeds, but it's worth trying.

If you find a solution, please let us know what worked!

Chad Warner | OptimWise | Websites that Empower Small Businesses | http://optimwise.com


On Fri, Jan 3, 2014 at 9:50 AM, Brian Richards <br...@rzen.net> wrote:
When I initially loaded the page I saw the video as just a black box, but the moment I changed the browser width enough to hit a CSS breakpoint I saw the properly embedded and responsive video.

If you're unsatisfied with the solutions you've tried so far, take this code for a spin:�https://gist.github.com/brichards/8239011

The first block would go into your theme's functions.php file (or a plugin, if you wanted to create one), while the second block would go into your theme's style.css (or, again, a stylesheet loaded by a plugin).

This is something I wrote for myself so that every video I embed via oembed would be automatically responsive for http://WPSessions.com � you can see it in work on the homepage, in fact. Any video you're manually embedding (pasting the full iframe embed code, rather than just the video's URL) you'll need to manually wrap in <div class="video-wrapper"></div>.

Hope this helps!

Grace and Peace,
Brian Richards
On Fri, Jan 3, 2014 at 9:34 AM, Topher <top...@codeventure.net> wrote:
On 01/03/2014 09:32 AM, Matt Meade wrote:
>
> I run a wp install where the main content is in two responsive css
> columns, so it can get more narrow than your standard YouTube embed.
>
> I have tried default WordPress embed, and two widgets (fluid video
> embeds, and responsive video embeds).
>
> In all cases, when the width gets small enough, chrome browser only
> displays a black box instead of the video. Other browsers still show
> the video, but not chrome.
>
> I have tested this from my work pc and my home pc but I suppose it's
> possible that they show up fine for some people, reports?
>
> Does anyone have a solution that does what I am looking for? (Meaning
> not just "make your columns wider!" or "link to the video instead of
> embedding!")
>
> I would like video embedded and showing up even in chrome at these
> sizes of possible.
>
> Example: http://www.womensselfdefense.info/dev/2013/12/test-video/
>

I never get the bad behaviour you describe in Chrome. �Are you able to

check other machines and see if it's you?

--
You received this message because you are subscribed to the Google Groups "WordPress Grand Rapids (WPGR)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wpgr+uns...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "WordPress Grand Rapids (WPGR)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wpgr+uns...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "WordPress Grand Rapids (WPGR)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wpgr+uns...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "WordPress Grand Rapids (WPGR)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wpgr+uns...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Steve Colthorp

unread,
Jan 10, 2014, 12:26:25 PM1/10/14
to wp...@googlegroups.com
Matt, unfortunately I'm actually showing *both* pages have the 'black box' for your Responsive Video Embeds test -- see attached. They are screenshots from Google Chrome Version 31.0.1650.63 on a MacBook Pro. Sorry to be the bearer of bad news... :-/


On Fri, Jan 10, 2014 at 12:03 PM, Topher <top...@codeventure.net> wrote:
Both work fine for me in Chrome.


On 01/10/2014 11:54 AM, Matt Meade wrote:
Haven't had a chance to try the suggestions here yet but I noticed something weird about this.

Seems to display fine on the blog page showing multiple posts.
On Fri, Jan 3, 2014 at 11:28 AM, Matt Meade <ring...@gmail.com> wrote:

Unfortunately it's the default desktop size that sucks. It actually shows wider on mobile because it's one column instead of two :-(

Resizing the desktop smaller to make it change to single-column is what makes it work, not what breaks it :-(

I know that's slightly backwards to show wider content on smaller screens but I am trying to just trust the graphic artists original two column layout for full desktop size instead of saying "sorry about your layout but I can't code it" :-(

On Jan 3, 2014 11:17 AM, "Luke Rumley" <lu...@rumleydesign.com> wrote:
Keeping in mind that most people won't be resizing their desktop browsers, I tried it in Chrome on my iPhone and it worked fine on first load. FWIW.

Luke Rumley
616.425.8815


On Fri, Jan 3, 2014 at 10:05 AM, Chad Warner <ch...@optimwise.com> wrote:

I see the black box upon initial page load (Chrome on Win 7 x64). When I resize the browser and get the content into a single column, the video shows. If Brian's code doesn't work, you could also try the FitVids for WordPress plugin. I'd be surprised if it worked better than Fluid Video Embeds or Responsive Video Embeds, but it's worth trying.

If you find a solution, please let us know what worked!

Chad Warner | OptimWise | Websites that Empower Small Businesses | http://optimwise.com


On Fri, Jan 3, 2014 at 9:50 AM, Brian Richards <br...@rzen.net> wrote:
When I initially loaded the page I saw the video as just a black box, but the moment I changed the browser width enough to hit a CSS breakpoint I saw the properly embedded and responsive video.

If you're unsatisfied with the solutions you've tried so far, take this code for a spin: https://gist.github.com/brichards/8239011

The first block would go into your theme's functions.php file (or a plugin, if you wanted to create one), while the second block would go into your theme's style.css (or, again, a stylesheet loaded by a plugin).

This is something I wrote for myself so that every video I embed via oembed would be automatically responsive for http://WPSessions.com – you can see it in work on the homepage, in fact. Any video you're manually embedding (pasting the full iframe embed code, rather than just the video's URL) you'll need to manually wrap in <div class="video-wrapper"></div>.

Hope this helps!

Grace and Peace,
Brian Richards
On Fri, Jan 3, 2014 at 9:34 AM, Topher <top...@codeventure.net> wrote:
On 01/03/2014 09:32 AM, Matt Meade wrote:
>
> I run a wp install where the main content is in two responsive css
> columns, so it can get more narrow than your standard YouTube embed.
>
> I have tried default WordPress embed, and two widgets (fluid video
> embeds, and responsive video embeds).
>
> In all cases, when the width gets small enough, chrome browser only
> displays a black box instead of the video. Other browsers still show
> the video, but not chrome.
>
> I have tested this from my work pc and my home pc but I suppose it's
> possible that they show up fine for some people, reports?
>
> Does anyone have a solution that does what I am looking for? (Meaning
> not just "make your columns wider!" or "link to the video instead of
> embedding!")
>
> I would like video embedded and showing up even in chrome at these
> sizes of possible.
>
> Example: http://www.womensselfdefense.info/dev/2013/12/test-video/
>

I never get the bad behaviour you describe in Chrome.  Are you able to
blog.png
test.png
Reply all
Reply to author
Forward
0 new messages