Flowplayer FlashVars not working

WillD_IRL - February 4, 2009 - 12:51
Project:Lightbox2
Version:5.x-2.9
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

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:

LIGHTBOX OUTPUT NOT WORKING -

http://debonocode.org//files/flowplayer/FlowPlayerDark.swf?file=http://r...

SWF TOOLS OUTPUT - WORKING -

http://debonocode.org/files/flowplayer/FlowPlayerDark.swf?&width=600&height=450&config={+%27videoFile%27:+%27http://rapidshare.com/files/193621469/Debono_DV.flv%27%2C+%27initialVolumePercentage%27:+%2780%27+}&videoFile=http://rapidshare.com/files/193621469/Debono_DV.flv

-----------------------------------------------

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

config={+%27videoFile%27:+%27http://rapidshare.com/files/193621469/Debono_DV.flv%27%2C+%27initialVolumePercentage%27:+%2780%27+}

Any help would be great,

Thank you,

Will Devine.

#1

WillD_IRL - February 4, 2009 - 14:37

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.

Regards

Will Devine

#2

imclean - March 25, 2009 - 01:08

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 + "'}";

#3

attiks - November 13, 2009 - 21:23

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

 
 

Drupal is a registered trademark of Dries Buytaert.