Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is it possible to add support for Vimeo videos?
ITMW, is there a way to embed the Vimeo player in a lightbox? (excuse the newbie question)
Comment | File | Size | Author |
---|---|---|---|
#27 | 318418-lightbox2-vimeo-support-27.patch | 1.57 KB | acbramley |
#25 | lightbox2.vimeo-support-iframe.318418-25.patch | 2.04 KB | thijsvdanker |
#20 | 318418_20-lightbox_better_vimeo_support.patch | 1.16 KB | lobo235 |
Comments
Comment #1
stella CreditAttribution: stella commentedIf you use the emfield (embedded media) video module you can display vimeo videos on your site. Lightbox2 integrates with that so you can display the video in a lightbox.
Cheers,
Stella
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #3
thechraveler CreditAttribution: thechraveler commentedWhat about simply using Lightbox without Embedded Media module, as Google, Youtube, MySpace, and others enjoy with the Lightbox module now?
Comment #4
stella CreditAttribution: stella commented@thechraveler: no, I'm not willing to consider that at this time. In fact, I'd be more likely to remove support for the Google, YouTube, etc videos and make people use emfield for those too, before I'd add support for any more 3rd party providers.
Cheers,
Stella
Comment #5
Dracolyte CreditAttribution: Dracolyte commentedI'm reopening this issue because I still can't get Lightbox2 to display Vimeo videos. A working example of vimeo code would be extremely helpful, an example like that for all the other video formats shown here: http://drupal.org/node/252276.
Vimeo does not supply the syntax in its embed instructions or in its API. Vimeo's embed code is this:
<object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=337298&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=337298&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object>
I've tried using that and just about every kind of abbreviation of that in my Drupal code, such as this:
. The video only opens in a new window.
I'm using Drupal 6.09, I've installed and pointed to an flvplayer, I'm using embedded media field and embedded video field, and I've enabled Vimeo display according to all the instructions. Also, I can get Google and other videos to play in Lightbox2, just not Vimeo.
Has anyone out there gotten this to work?
Comment #6
stella CreditAttribution: stella commentedI'm not sure what you're doing, but if using emfield video module as you say, then you just need to select one of the Lightbox2 options from the 'display' options when configuring that content type. It should work then without any problems and without any need for you to write html. The instructions at http://drupal.org/node/252276 aren't needed for emfield module.
Cheers,
Stella
Comment #8
Dracolyte CreditAttribution: Dracolyte commentedOkay, I finally figured out the syntax for Vimeo in LightBox. It might help to add it to http://drupal.org/node/252276 where the syntaxes for other videos are listed.
The correct syntax is this:
<a rel="lightvideo" href="http://vimeo.com/4559447">
What Vimeo gives you is this, BTW, and you have to winnow it down to the above.
<object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=4559447&server=vimeo.com&show_title=1&show_byline=0&show_portrait=0&color=ffffff&fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=4559447&server=vimeo.com&show_title=1&show_byline=0&show_portrait=0&color=ffffff&fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object><p><a href="http://vimeo.com/4559447">#2 Flying Kebab - The things I do for you babe</a> from <a href="http://vimeo.com/matheussiq8">Matheus Siqueira</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
Hope this helps someone!
Comment #9
monstordh CreditAttribution: monstordh commentedI can't get this to work. It jumps to the vimeo site. Anything else we need to know?
Comment #10
Dracolyte CreditAttribution: Dracolyte commentedHere are more details:
Drupal 6.11
Syntax:
<a rel="lightvideo" href="http://vimeo.com/2729374" id="video11"><img height="38" width="50" alt="Something" src="/thumbs/something.jpg" /></a>
Modules:
LightBox2 6.x-1.9, Embedded Media Field, Embedded Video Field 6.x-1.0-beta1
Config:
Embedded Media Field / Use swfobject: Off
Embedded Video Field / Vimeo configuration / Allow content from Vimeo: Checked
Does that do the trick?
Comment #11
Anonymous (not verified) CreditAttribution: Anonymous commentedFor whatever it's worth
drupal 6.12
emfield 6.x-1.0
lightbox2 6.x-1.9
Under admin/content/emfield
Swfobject unticked
Allow content from vimeo
Create content type (e.g. "videocontent") or add field to existing one with "embedded video" field type. Check vimeo as provider, configure sizes etc under manage fields tab.
Set display options under Display Fields tab to whichever lightbox2 option you have/want.
Create a "videocontent" node, put
in the "Video:" url field (not in body), xxxxx is the vimeo id.
Comment #12
exiled_hammer CreditAttribution: exiled_hammer commentedI couldn't get Vimeo working using lightvideo method described above. I did manage to find a solution using lightfame with the code below.
<a href="http://vimeo.com/moogaloop.swf?clip_id=videoid" rel="lightframe[|width:400px;height:300px;padding:0;][We can add some text here]">Play Vimeo</a>
Hope this is of use to people.
Comment #14
rolandk CreditAttribution: rolandk commentedAnyone figure out a way to autoplay the vimeo video in the lightbox2 ?
Comment #15
festerm CreditAttribution: festerm commentedIn the "exiled_hammer " solution it`s possible to make the vimeo fullscreen button to work?
Comment #16
ts230 CreditAttribution: ts230 commentedI can't get this to work. I can't install emfield in 6.16, and have lightbox 2 installed. Please help me!
Comment #17
Martijn Houtman CreditAttribution: Martijn Houtman commentedIn lightbox_video.js, add the following function:
and edit:
This is a fast trick, but it does the job. The HTML code should look like:
Comment #18
gaffnere CreditAttribution: gaffnere commentedHi,
Thanks everyone for all the helpful posts above - I now have Lightbox2 up & running alongside Vimeo on my site, using Emfield.
However, I was wondering if anyone can please tell me how to prevent the scroll bars appearing along the right side & bottom of the lightbox when it opens? These scroll bars appear regardless of what size I make the lightbox... The video pretty much fits into the box, there is just a tiny bit of white space around the edges.
Any tips of ideas would be greatly appreciated. Thanks.
P.S. I followed Martijn Houtman's steps in the last post.
Comment #19
KarimB CreditAttribution: KarimB commentedI use this in my style.css
#lightbox #modalContainer {overflow:hidden;}
#lightbox #imageData #bottomNav {height:20px;}
#bottomNavClose {margin-top:0px; padding-top:0px}
Works great.
Comment #20
lobo235 CreditAttribution: lobo235 commentedHey all, I rolled a patch from #17 above. It's meant to work with version 6.x-1.11 of the lightbox2 module.
Comment #21
emcniece CreditAttribution: emcniece commentedBeautiful, the patched worked for me. Thank you all for spending the time to figure this out :)
Comment #22
rolandk CreditAttribution: rolandk commentedI spent a long time trying to set up Emfield with Lightbox2 for vimeo.
Eventually I found that colorbox for vimeo is a much easier option.
To autoplay simply add '&autoplay=true' at the end of your embed src url
http://drupal.org/node/1206814#comment-4682710
http://drupal.org/project/colorbox
Comment #23
rooky CreditAttribution: rooky commentedi used the submission #17 it worked very good but the films doesn't appear on the ipads as it appear white window only any help regarding this
Comment #24
mezitlab CreditAttribution: mezitlab commentedlobo235: Thank you all for spending the time to figure this out too.
Please accept this patch. It works!
Comment #25
thijsvdanker CreditAttribution: thijsvdanker commentedI've been using #20 for a while on my site, and it works.
But #23 makes a valid point: no ipad support (as it needs flash).
I've changed #20 to create an iframe embed for vimeo.
Please review.
Comment #26
dexiecarla CreditAttribution: dexiecarla commentedConfirming that patch #25 works perfectly.
Thanks
Comment #27
acbramley CreditAttribution: acbramley commentedThe patch in #25 needs the $Id tag removed, other than that it works great!
I've rolled a patch for 7.x
Cheers
Comment #28
alhambra CreditAttribution: alhambra commentedPatch #27 works for me on 7.x-2.10! Thx!!
Comment #30
volegerThanks, rerolled and pushed