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&hei...{+%27videoFile%27:+%27http://rapidshare.com/files/193621469/Debono_DV.flv%27%2C+%27initialVolu...}&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+%27initialVolu...}
Any help would be great,
Thank you,
Will Devine.
Comment | File | Size | Author |
---|---|---|---|
#12 | lightbox2-flowplayer-369032-12.patch | 1.87 KB | EmanueleQuinto |
#4 | lightbox_video.js_.flowplayer.patch | 1.88 KB | EmanueleQuinto |
Comments
Comment #1
WillD_IRL CreditAttribution: WillD_IRL commentedAn 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
Comment #2
imclean CreditAttribution: imclean commentedThanks 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 + "'}";
Comment #3
attiks CreditAttribution: attiks commentedI had to use this
href = Lightbox.flvPlayer + "?&config={ 'playlist': [ { 'url':'" + href + "'}]}";
Comment #4
EmanueleQuinto CreditAttribution: EmanueleQuinto commentedHere 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:
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.
Comment #5
3rdLOF CreditAttribution: 3rdLOF commentedI can confirm that last patch by Emanuel works like butter.
Nice job.
Comment #6
Yuki CreditAttribution: Yuki commentedsubscribe
Comment #7
jvj CreditAttribution: jvj commentedDoes 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:
/sites/all/modules/flowplayer/flowplayer/flowplayer.swf
FLV Player flashvars:
autoPlay=false&autoBuffering=true
And I'm testing by using this kind html in a CCK generated node:
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?
cheers
-jvj
Comment #8
bitsantos CreditAttribution: bitsantos commentedI 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.)
Comment #9
stella CreditAttribution: stella commentedduplicate of #362039: Displaying video content (.swf) not working and #361870: FLV Flashvars for Individual Videos I think.
Comment #10
A Romka CreditAttribution: A Romka commentedit should be
variables = Lightbox.flvFlashvars.replace(/\[clip\]/i, Lightbox.videoId);
not
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.
Comment #11
lobo235 CreditAttribution: lobo235 commentedThe patch in #4 applied to version 6.x-1.11 worked for me as well.
Comment #12
EmanueleQuinto CreditAttribution: EmanueleQuinto commentedUpdated version of patch from #4.
You should enter your html as:
Comment #13
imclean CreditAttribution: imclean commentedI 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).
Comment #14
mayur.pimple CreditAttribution: mayur.pimple commentedThanks .. this patch is perfectly working.
Comment #15
tusik CreditAttribution: tusik commentedI 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;
for
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.
Comment #16
pinin4fjords CreditAttribution: pinin4fjords commentedSame issue present for D7, same fix works. (tackled slightly differently in http://drupal.org/node/1596206)