YouTube Import: Sizing the video viewer

Hi all, I’m feeling a little at wit’s end with this YouTube Import. The problem is that the the size of the video viewer on the user-facing page is very short, and only shows a slice of the video content.

I have futzed with the settings in the plug-in “Configure” menu over and over again to no avail. (I’ve tried entering new values in both px and %.)

I’ve also tried a different theme – no change.

Anyone have any experience with this problem?
Thanks so much in advance!

Well, we already had this discussion in a separate forum, but I’ll post the resolution here as well:

The issue here is that the plugin loads CSS that affects all videos included in exhibits. In particular, it sets a style of height: 100% which doesn’t really work to set the height. Replacing that style with something different, like a specific pixel height, eliminates this problem.

Alternatively, getting rid of the styles there completely would allow the admin settings for video dimensions to take effect.

1 Like

Thank you for the additional detail! Now going to play around with getting rid of that style, and developing admin settings for more flexible sizing.

For anyone looking to make their youtube container responsive in sizing, here is the code to put in the YouTube Import public CSS file:


div.exhibit-items {
   overflow: hidden;
  /* 16:9 aspect ratio */
  padding-top: 56.25%;
  position: relative;
}


div.exhibit-items iframe {
  
   border: 0;
   height: 100%;
   left: 0;
   position: absolute;
   top: 0;
   width: 100%;
}

This topic was automatically closed after 250 days. New replies are no longer allowed.