I have specified the path to the flv player in the video settings in lightbox.
The flash video file downloads when clicked on and lightbox is empty.

Here is the webpage http://www.aleksandrarudnicka.com/node/83

the code I put in is:
remember me video - default size

I put both the player and the video file in the Drupal root directory

As far as I remember this was working before the upgrade to the latest lightbox.
The problem occurs with both google chrome and firefox3.

All the best /Tobias

CommentFileSizeAuthor
#23 357318_lightbox2.patch417 bytesimclean

Comments

tobbetobbe’s picture

After fiddling around, the page is now here:
http://www.aleksandrarudnicka.com/node/86

stella’s picture

Your website has the following code (put within <code> tags so it's not rendered).

<a href="/video.flv" rel="lightvideo[width:300px; height: 200px;][Test video to try to display inside lightbox]">remember me video - default size</a>

The lightvideo attribute changed in the last release so as to include support for grouping of videos. It's now rel="lightvideo[groupname|width:300px; height: 200px;][caption]" or rel="lightvideo[|width:300px; height: 200px;][caption]". See the documentation at http://drupal.org/node/252276 for more details.

The path to your flv player is "player.swf". You need to include a leading slash, e.g. "/player.swf".

Cheers,
Stella

tobbetobbe’s picture

Works fine with a mov file.

tobbetobbe’s picture

sorry, posted before I read you answer.

tobbetobbe’s picture

I changed the code to:

<a href="/video.flv" rel="lightvideo[|width:300px; height: 200px;][test video inside lightbox]">remember me video - default size</a>

and changed to "/player.swf" in the video settings. The browser still downloads the file instead of showing it in lightbox. weird...

stella’s picture

tobbetobbe’s picture

I added this to the flashvars field in lightbox video settings:
"&backcolor=111111&frontcolor=cccccc&lightcolor=66cc00&skin=/stylish.swf&controlbar=over"
I got that code from the JW player setup wizard page.

... and suddenly it works!!

Does this mean you have to use flashvars?

another thing: the flashvars settings should show the controls over the video, but they show only when the video is fullscreen. Any idea on that?

I am having so much fun with this module. Thank´s for that. I will be even happier the day I finish this, my first drupal website :) Starting to doubt that day will ever come.

/Tobias

tobbetobbe’s picture

It seems as if you have to put an extra "&" after the last flashvars setting to make it work. Now I have this and it works fine:
"&backcolor=111111&frontcolor=cccccc&lightcolor=66cc00&skin=/stylish.swf&controlbar=over&autostart=true&"

All the best
Tobias

stella’s picture

Status: Active » Fixed

You shouldn't have to use flashvars, but glad you got it working.

Cheers,
Stella

ncy’s picture

with blank flashvars field on the settings page, i also got that the browser would try to download the FLV file ...

i had to add this line to get the video working properly when flashvars field is blank:

in lightbox_video.js:


...
    else {
      Lightbox.videoId = href;
      href = Lightbox.flvPlayer + '?file=' + href;
      if (Lightbox.flvFlashvars.length) {
        variables = Lightbox.flvFlashvars;
        href = href + '&' + Lightbox.flvFlashvars;
      }
      /* THIS LINE HERE: */
      else variables=''; // if the flashvars field is blank, don't pass a null value to createEmbed, pass empty string instead

      Lightvideo.createEmbed(href, "flvplayer", "#ffffff", variables);


...

-nick

stella’s picture

Category: support » bug
Status: Fixed » Needs review
elf_cash’s picture

If you are loading the lightbox js in the page footer, it may be advisable to embed the flash video in a generic html page and use the lightbox to open that page instead of the video itself(You can configure this so it looks similar to embedding the video into a lightbox directly). Since the code that calls the player is in javascript, if a user tries to click on a video link before the page has been fully loaded, IE will still try to dowload the flv file. This is not a bug per se, but certainly not the desired behavior. If the video is embedded in a blank html page and the user tries to click the link prematurely, the video will just load as a new page instead of in a lightbox.

izkreny’s picture

You shouldn't have to use flashvars, but glad you got it working.

Hm, I have .swf file and JW FLV Player v4.3, and it is not working when flashvars field is empty in "Video settings" section (under Lightbox2 administration page).

I just added one character in flashvars field: "&" (without quotes), and suddenly JW FLV Player v4.3 is showing up. ;)

Edit: hehe, but this is exactly what ncy code do, as far as I can see. :)

russhull’s picture

I've tried all of the possible solutions in this thread and I'm still coming up with the problem mentioned in the first post. Regardless of the video format I use (I've tried flv via flowplayer and flv and mp4 via JW FLV player), both firefox and safari either want to download the FLV file or play the MP4 in the default way (not through lightbox).

I've tried adding info into the flashvars field.

I've tried leaving the flashvars field blank and adding the line of code mentioned above into the lightbox_video.js file.

Nothing is working for me. Any ideas as to what else could be going wrong? The problem is the same in either firefox or safari.

Here's the HTML I'm using to link to the video:

<a href="/flv/Chad-320.flv" rel="lightvideo[|width:320px; height: 240px;][Watch Trailer]">Watch trailer</a>

This is the path I've provided for flowplayer:

/flowplayer/flowplayer-3.0.3.swf

And for JW FLV player:

/mediaplayer/player.swf

ncy’s picture

not sure if relevant to your case, but some of my past experiences with the files getting downloaded was some conflicting module. sorry i dont recall exactly what module(s) it was in my case, it was awhile ago and i've since resolved the problems or found workarounds. try disabling some modules and see if that changes anything ....

ncy’s picture

also russhull, is there a reason why you have a leading "|" character before the width+height? i don't know if that causes problems or not?

russhull’s picture

i copy-pasted the "|" from the documentation, and have seen it in a link that works successfully. So that's not the culprit.

I'm leaning towards it being a conflicting module at this point, but I've tried disabling every module that I'm not using... and I'm really only using some pretty basic ones. Do you think it makes sense to go as far as actually deleting unused modules from the server, or does disabling them achieve the same results?

ncy’s picture

i think disabling should achieve the same results. to be extra sure, uninstall and completely delete it, but that shouldn't be necessary.

the other thing to look out for is if you have any custom javascript/css code that might conflicting.

russhull’s picture

I HAVE deleted a few lines of php from page.tpl.php... stella, are you aware of lightbox relying on any of these functions being present in that file to function? IE if I deleted the function to display the log or something would this cause lightbox to stop appearing?

imclean’s picture

Nick's fix (#10) is still required in the latest dev version (2009-Sep-14). Without it, if the flashvars are left blank a javascript error occurs: "variables not defined" at line 34.

Line 34 is: Lightvideo.createEmbed(href, "flvplayer", "#ffffff", variables);

The browser then tries to download the file instead of embedding it.

Yuki’s picture

subscribing

imclean’s picture

Version: 6.x-1.9 » 6.x-1.x-dev
Component: Miscellaneous » Javascript

This bug still exists in the current dev version Lightbox2 6.x-1.x-dev (2010-May-06). I can't believe such a simple fix as #10 hasn't been incorporated yet.

As we rarely use flashvars, updating existing sites is becoming a serious problem. Hacking a module every update is not an ideal way of doing things.

Please, is anyone else seeing this? Why has this issue gone on for so long?

imclean’s picture

StatusFileSize
new417 bytes

Patch based on #10, done slightly differently. Please include this fix in one form or another!

stella’s picture

Status: Needs review » Fixed

committed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.