Lightbox2 - How to display video content | Lightbox2 - How to add a lightbox to your images and other content | Drupal Wiki guide on Drupal.org
Skip to search
Can we use first and third party cookies and web beacons to
understand our audience, and to tailor promotions you see
Documentation
Advertising sustains the DA. Ads are hidden for members.
Join today
On this page
Enabling video support
Customization
Supported Video Formats
Lightbox2 - How to add a lightbox to your images and other content
How to add Lightbox2 to gallery of images
Lightbox2 - How to add a lightbox to images
Lightbox2 - How to add a lightbox to webpage links
Lightbox2 - How to add inline content
Lightbox2 - How to create a slideshow
Lightbox2 - How to display Drupal messages in a lightbox
Lightbox2 - How to display video content
Lightbox2 - How to to open a lightbox from a Flash movie
Lightbox2 - How to use the "Lightbox Trigger" Views field
Lightbox2 - How to use with CCK Imagefield and Imagecache
Lightbox2 - How to use with Gallery2
Using Lightbox2 with TinyMCE or FCKEditor
Using Lightbox2 with dynamically created content and "start slideshow" link
Lightbox2 - How to display video content
Last
updated
on
30 April 2025
It's possible to show video content in the lightbox. In this case the "rel" attribute should be set to
lightvideo
. It's possible to group videos and to control the size of the lightbox by setting the 'width' and 'height' properties. The properties can be configured like
lightvideo[group|width:300px; height: 200px;]
. The properties should all be of the format "property: value;" - note the closing semi-colon. If no properties are set, then the default width and height of 400px will be used. See below for more detailed examples.
Basic example:
Google video example - default size
Basic example with caption:
Google video example - default size
Basic example with caption:
Grouped video 1
Grouped video 2
Controlling lightbox size example:
Google video example - custom size
Enabling video support
By default, support for videos is disabled. However, this can be easily enabled by checking the
enable video support
option on
admin/settings/lightbox2
Customization
On
admin/settings/lightbox2
under the
Video Settings
collapsed fieldset, there is the ability to configure both a path to a FLV player and FLV flashvars. The ability to customize the flashvars allows you to turn on and off autoplay, etc. It is not supported for all video formats / 3rd party providers. Fullscreen support is automatically enabled where available.
Supported Video Formats
asx, wmv, mov and swf videos should all be supported.
The following video providers are supported (where
videoid
represents the id of the video in question):
Google video
The links need to be in one of the following formats:
videoid
videoid
videoid
google.com, google.de and other google per-country domains should all be supported.
The links need to be in one of the following formats:
youtube.com/v/
videoid
youtube.com/watch?v=
videoid
youtube.com/?v=
videoid
MySpace
The links need to be in one of the following formats:
myspace.com/index.cfm?fuseaction=vids.individual&videoid=
videoid
myspacetv.com/index.cfm?fuseaction=vids.individual&videoid=
videoid
Live Video
The links need to be in one of the following formats:
livevideo.com/flvplayer/embed/
videoid
livevideo.com/video/
videoid
spike.com (formerly ifilm.com)
The links need to be in one of the following formats:
spike.com/video/
videoid
ifilm.com/video/
videoid
Metacafe
The links need to be in one of the following formats:
metacafe.com/watch/
videoid
/.....
metacafe.com/fplayer/
videoid
/.....
Vimeo
This provider is supported with a patch provided at
vimeo.com/
videoid
If you would like support for additional video providers to be provided, please submit a feature request to the Lightbox2 issue queue with all the relevant details.
Help improve this page
Page status:
Not set
You can:
Log in, click
Edit
, and edit this page
Log in, click
Discuss
, update the Page status value, and suggest an improvement
Log in and
create a Documentation issue
with your suggestion
Drupal’s online documentation is © 2000-2026 by the individual contributors and can be used in accordance with the
Creative Commons License, Attribution-ShareAlike 2.0
. PHP code is distributed under the
GNU General Public License
Infrastructure management for Drupal.org provided by
Need a Drupal 7 extended support partner? Consider Tag1.
News items
News
Planet Drupal
Social media
Sign up for Drupal news
Security advisories
Jobs
Our community
Community
Services
Training
Hosting
Contributor guide
Groups & meetups
DrupalCon
Code of conduct
Documentation
Documentation
Drupal Guide
Drupal User Guide
Developer docs
API.Drupal.org
Drupal code base
Download & Extend
Drupal core
Modules
Themes
Distributions
Governance of community
About
Web accessibility
Drupal Association
About Drupal.org
Drupal is a
registered trademark
of
Dries Buytaert