On this page
Lightbox2 - How to display video content
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:
<a href="http://video.google.com/videoplay?docid=1811233136844420765" rel="lightvideo">Google video example - default size</a>
Basic example with caption:
<a href="http://video.google.com/videoplay?docid=1811233136844420765" rel="lightvideo[][my caption]">Google video example - default size</a>
Basic example with caption:
<a href="http://video.google.com/videoplay?docid=22349072348092348324" rel="lightvideo[groupname][my caption]">Grouped video 1</a>
<a href="http://video.google.com/videoplay?docid=1811233136844420765" rel="lightvideo[groupname][my caption]">Grouped video 2</a>
Controlling lightbox size example:
<a href="http://video.google.com/videoplay?docid=1811233136844420765" rel="lightvideo[|width:400px; height:300px;][my caption]">Google video example - custom size</a>
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:
- http://video.google.com/googleplayer.swf?docId=
videoid - http://video.google.com/videoplay?docid=
videoid - http://video.google.com/videoplay?docid=
videoid
google.com, google.de and other google per-country domains should all be supported.
YouTube
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 https://www.drupal.org/node/318418:
- 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
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