The lightbox popup for video had scrollbars in the iframe.

The attached patch adds and offset to the height of 16px, the same as that added to the width - fixing the issue.

DT

CommentFileSizeAuthor
#10 Picture 2.png20.22 KBbkosborne
emvideo.theme_.inc_.patch878 bytesdavidwhthomas

Comments

alex ua’s picture

Version: 6.x-1.0 » 6.x-1.x-dev
Status: Active » Fixed

Committed. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jhofer’s picture

Thanks for this!

akolahi’s picture

another way to do it is by theming. you can add something like this to your css:

#lightboxFrame{
width: 110%;
}
mennonot’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev

I had this problem of unwanted scroll bars with a lightbox iframe showing a Vimeo video with Embedded Video Field 6.x-2.x-dev and Lightbox2 6.x-1.9. The CSS solution doesn't work, but this modification of davidwhthomas' patch worked at line 215 of emfield/contrib/emvideo/emvideo.theme.inc:

if ($options['modal'] == 'lightbox2') {
    $attributes['attributes']['rel'] = 'lightframe['. $field['type_name'] .'|width:'. ($width + 50) .'; height:'. ($height + 50) .';]'; 
  }

which was:

if ($options['modal'] == 'lightbox2') {
    $attributes['attributes']['rel'] = 'lightframe['. $field['type_name'] .'|width:'. ($width + 16) .'; height:'. ($height + 16) .';]'; 
  }
CinemaSaville’s picture

I had the same problem using Shadowbox, and simply removed the +5 from both width and height. Now it works perfectly.

imclean’s picture

Using lightbox2, there was too much of a gap to the right and underneath the video. The values which worked for me are as follows:

$attributes['attributes']['rel'] = 'lightframe['. $field['type_name'] .'|width:'. $width .'; height:'. ($height + 3) .';]';

The horizontal scrollbar only appeared because the vertical one was there adding to the width. Removing the vertical scrollbar ($height + 3) meant the horizontal one disappeared as well.

Perhaps these values could be configurable through the admin settings. They could vary with different players.

imclean’s picture

Status: Closed (fixed) » Active

Actually, given my (and others') comments above, I don't consider this is fixed. Widespread testing with more detailed descriptions of the problem would be a good idea.

I'm using Embedded Media Field with the Media YouTube module, using the YouTube player. As mentioned above, giving enough space for the player (3px vertically in this case) removed the requirement for either scrollbar.

henrijs.seso’s picture

+1

#7 was close, still small strip of <body> below video, but setting it to black did the trick. is this really lightbox type modules issue?

bkosborne’s picture

StatusFileSize
new20.22 KB

Here is what mine looks like without any modifications. This is launched from a emthumb imagecache field being clicked... i'll try and do what I can in CSS, but certainly a weird problem.

dgsiegel’s picture

this patch http://drupal.org/node/1050792#comment-4137386 might be interesting for, although i have no idea if lightbox2 supports embedded videos

Germando’s picture

Version: 6.x-2.x-dev » 6.x-2.5

This fix is for version 6.x-2.5 -- Everybody has different numbers, here mines:

if ($options['modal'] == 'lightbox2') {
    $attributes['attributes']['rel'] = 'lightframe['. $field['type_name'] .'|width:'. ($width + 14) .'; height:'. ($height + 50) .';]';
  }

In Addition, some CSS:

#media-youtube-1,
#lightboxFrame,
#media-youtube-default-external-1,
#media-youtube-default-external-object-1 {
  width:438px;
  height:367px;
  border:none;
}