Hi Stella,

Firstly thank you for your fantastic module.

After much searching I could not find any solution to my problem. I have narrowed it down. I'm using Flowplayer to play FLV file. Flowplayer is working, It loads.

No Video is loaded though. If I use SWF Tools it does work.

Here is the output from Lighbox2 to call the file:






It looks like flowplayer needs a Flash Var Array called 'config' in the structure


Any help would be great,

Thank you,

Will Devine.

Members fund testing for the Drupal project. Drupal Association Learn more


WillD_IRL’s picture

An update, with some module hacking I sorted this out. I do not know how to write a pathch but this may be helpfull to others so here goes...

As stated above, Flowplayer seems to need a variable called 'config'

By changing the following line in lightbox_video.js (line 28)

Non working line = href = Lightbox.flvPlayer + '?file=' + href;

New line that works = href = Lightbox.flvPlayer + "?&config={videoFile:'" + href + "'}";

I have not fully tested this, with different settings but it seems to work now. This is a ugly hack so lets hope this fix gets put in as I try to avoid hacking code as much as I can.

(The idea for this hack came from: Post #10 by ncy in http://drupal.org/node/357318 - Lightbox does not load flv player after upgrade)

Once again,

Thanks Stella, and all those Drupallers that have helped me out so much over the last 6 months.


Will Devine

imclean’s picture

Thanks for the tip, WillD_IRL, it gave me a good place to start. The above didn't work for me with version 6 so I had a dig here: http://flowplayer.org/demos/installation/alternate/index.html

The following works for Lightbox2 6.x-1.x-dev 2009-Feb-09 and flowplayer-3.0.7.swf :

href = Lightbox.flvPlayer + "?&config={'clip':'" + href + "'}";

attiks’s picture

I had to use this
href = Lightbox.flvPlayer + "?&config={ 'playlist': [ { 'url':'" + href + "'}]}";

EmanueleQuinto’s picture

Here attached a patch for flowplayer. It add antoher elseif to match the flowplayer and set properly the flashvar on embed HTML function.

You should enter your html as:

<a title="WFP on Haiti" rel="lightvideo" href="http://content.bitsontherun.com/videos/upsuzyVP-58423.flv">click here!</a>

It's a quite simple patch and I guess selection of the player (and different rendering based on this) should be handled on the module setting page. I didn't had time to modify the code yet but at least in this way I'm able to play videos with flowplayer.

3rdLOF’s picture

I can confirm that last patch by Emanuel works like butter.

Nice job.

Yuki’s picture


jvj’s picture

Version: 5.x-2.9 » 6.x-1.9

Does not work in 6.x.1.9 with flowplayer 6.x.1.0-beta1, what I get is a lightbox2/flowplayer screen but no video.

My lightbox video settings are:

Path to FLV Player:

FLV Player flashvars:

And I'm testing by using this kind html in a CCK generated node:

<a title="test" rel="lightvideo" href="http://site/path/video.flv">Test</a>

The lightbox2/flowplayer seems to work (is shown and functional) but has no video to play.
Lightbox2 images work alright on the same node, so it's just the video having problems.

Btw. if I leave those flashvars empty (not set) I don't even get the flowplayer, just lightbox screen with a spinning busy icon and a pop-up asking if I like to download the video or play it in external player (which works, i.e. the link to video is correct).

any ideas?

bitsantos’s picture

I finally got Flowplayer to work with Lightbox2.

On line #28 of lightbox_video.js, you'll find:

href = Lightbox.flvPlayer + '?file=' + href;

This basically assumes that the FLV player you'll be using needs the URL of the FLV file via the "file" variable in the query string. Unfortunately, Flowplayer doesn't like to make it that simple.

I just inserted the following after line #30 (if (Lightbox.flvFlashvars.length) {):

Lightbox.flvFlashvars = Lightbox.flvFlashvars.replace(/\[clip\]/i, clip);

That little snippet will allow you to use the following FLV Player Flashvars in the Lightbox2 settings page:


The little change we made in lightbox_video.js automatically replaces "[clip]" in the flashvars with the URL of your FLV file. This change also theoretically allows for greater compatibility with other FLV players.

(Sorry, I'd make a patch if I knew how or if I had the time to figure it out.)

stella’s picture

Status: Active » Closed (duplicate)
A Romka’s picture

it should be
variables = Lightbox.flvFlashvars.replace(/\[clip\]/i, Lightbox.videoId);

Lightbox.flvFlashvars = Lightbox.flvFlashvars.replace(/\[clip\]/i, clip);

- if you have multiple videos on the page - replacing Lightbox.flvFlashvars will show you first clicked video all the time.

lobo235’s picture

The patch in #4 applied to version 6.x-1.11 worked for me as well.

EmanueleQuinto’s picture

Version: 6.x-1.9 » 6.x-1.11
1.87 KB

Updated version of patch from #4.

You should enter your html as:

<a title="WFP on Haiti" rel="lightvideo" href="http://content.bitsontherun.com/videos/upsuzyVP-58423.flv">click here!</a>
imclean’s picture

Category: bug » feature
Status: Closed (duplicate) » Needs review

I don't think this is a duplicate as it's Flowplayer specific and the problem isn't resolved in 6.x-1.11. The patch in #12 works well for me with Flowplayer 3.2.7, thanks.

Regarding the patch, the config section of Flowplayer's flashvars can take other config options. Potentially these could be specified in the "flashvars" field in the lightbox2 settings screen if the patch supported it, although this could be better suited to other modules (flowplayer, swftools).

mayur.pimple’s picture

Thanks .. this patch is perfectly working.

tusik’s picture

I would like to confirm it did work for me with Flowplayer v. 3.2.11 and Lighbox2 in Drupal 6.24, with the following changes:

replacing line 30 of lightbox_video.js

href = Lightbox.flvPlayer + '?file=' + href;


href = Lightbox.flvPlayer + "?&config={'clip':'" + href + "'}";

The path to the player in the lightbox admin/settings, with no leading slash but including the "flowplayer.swf" at the end and the following parameters for the flashvars: "autoPlay=true&autoBuffering=true"

Renaming the files in folder flowplayer!!!! Make sure you remove the release version number from the flowplayer.swf and the flowplayer.controls.swf files!
(originally were named flowplayer-3.2.11.swf and flowplayer.controls-3.2.11.swf and obviously the paths were messed up)

I hope this saves people some time.

pinin4fjords’s picture

Same issue present for D7, same fix works. (tackled slightly differently in http://drupal.org/node/1596206)