Lightbox does a great job at playing videos, but I can't seem to get it to play flv videos. It would be great to be able to do this.

Comments

stella’s picture

Category: feature » support

flv videos are supported. What's the HTML that you're using to generate the link (put between <code> tags when pasting in)? Perhaps send me a link to your site where I can see it not working, my contact form is enabled if you wish to do so privately. Or can you send me the link to the video?

Cheers,
Stella

jasonkotter’s picture

Hmmm . . . the html code is

<div class="content"><a href="/sites/family.kaykotter.com/files/video/1.flv" class="media" rel="lightvideo">A test flash video.</a> </div>

I'm using jquery media to automatically convert filefield attachments to their correct media form - perhaps this is the problem? The above code works great for my .mov files, but only opens up a blank lightbox for my .flv files.

Thanks,
Jason

stella’s picture

Can you give me access to the site? I tried creating an account.

Do you get any errors?

jasonkotter’s picture

Stella,

I've given you access. Let me know if I need to give you different permissions . . . the site is still in very early construction stages, but you should be able to find your way around.

The only error I'm getting is a jQ error: The jquery_blockui jQuery plugin is not defined.

However, I don't think that it's related to the problem.

Thanks again.

duntuk’s picture

from the looks of things on the lightbox2 docs page ( http://www.stellapower.net/lightbox2 ), it doesn't appear that lightbox2 is capable of displaying .flv files (videos) by itself... it's only capable of displaying VIDEO PLAYERS--e.g. you would need to have JW FLV Media Player somewhere on your server plus other code to call the player along with flv file when clicked.

doing something like this won't do a thing (at least for now; untill something like JW FLV Media Player is implemented into the module--or the readme tells you how to install it --e.g. op_video module)

<a href="/sites/family.kaykotter.com/files/video/1.flv" class="media" rel="lightvideo">
dylanb’s picture

Do you have any idea when this might happen? It would be so cool to be able to link to a .flv file and have it pop up in flowplayer (or similar).

stella’s picture

I'm working on a fix. Do you have a flv file I could check against on your site? I dont' think my login works there any more.

Cheers,
Stella

dylanb’s picture

StatusFileSize
new7.76 KB

OK, check this out. I've got it working on Safari 3.0.4 on a Mac (OSX 10.4.11) and partially working on Firefox 2.0. The Safari instance is displaying sound and video whereas Firefox is only doing sound. Maybe you can make more sense of it.

The link to the .flv file is standard enough...

<a href="/files/videos/2.flv" rel="lightvideo[width:400px; height:300px;][my caption]">TROOPS (.flv)</a>

and this is the ugly hack I performed on the `createEmbed` function in the lightbox_video.js file...

  // createEmbed()
  createEmbed: function(href, id, color, variables) {
    var bgcolor = 'bgcolor="' + color + '"';
    var flashvars = "";
    if (variables) {
      flashvars = variables;
    }

    if (id == 'flvvideo') {
      
      flashvars = 'flashvars=\'config={"autoPlay":false,"autoBuffering":false,"autoRewind":false,"loop":false,"videoFile":"'+ href +'","initialScale":"scale","useNativeFullScreen":true,"emailPostUrl":false,"useHwScaling":true}\' ';
      href = '/misc/video/FlowPlayerDark.swf';
    };
    Lightbox.modalHTML = '<embed type="application/x-shockwave-flash" ' +
      'src="' + href + '" ' +
      'id="' + id + '" name="' + id + '" ' + bgcolor + ' ' +
      'quality="high" wmode="transparent" ' + flashvars + ' ' +
      'height="' + Lightbox.modalHeight + '" ' +
      'width="' + Lightbox.modalWidth + ' ' +
      '">';
  },

Essentially it's just a check to see if the id is flvvideo followed by a hard-coded set of configuration directives and an arbitrarily placed FlowPlayer file. The rest is untouched.

As I say, it works fine in Safari but the FlowPlayer is not visible in FireFox. I've also attached my amended `lightbox_video.js` file in case you find it easier.

stella’s picture

Status: Active » Fixed
StatusFileSize
new4.87 KB

In order to play flv videos (which don't come with a player like on 3rd party sites), you need to install a FLV player. The attached patch allows the user to configure the path to the installed flv player on admin/settings/lightbox2, under the "Video settings" collapsed fieldset.

A good flv player can be downloaded from http://www.jeroenwijering.com/ This is free for non-commercial use.

The attached patch will also be included in the next dev release, available later today.

Cheers,
Stella

ephman’s picture

hello,

sorry to barge in, but i have been searching for the exact same solution. however i use durpal6 and Lightbox2 6.x-1.8. any help would really be appreciated.

thanks,

ephman

stella’s picture

The same fix will be in the next lightbox2 6.x dev release, available later today.

ephman’s picture

thank you so much!!!

ephman

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

ncy’s picture

Status: Closed (fixed) » Active

is there a way to configure the JW FLV Player's flashvars to customize the player (skin, color, logo overlay, buffer time, etc) http://code.jeroenwijering.com/trac/wiki/FlashVars

if so, where should this be done in the Lightbox2 code? i tried adding "flashvars='.....'" in lightbox_video.js, passing it in as the last parameter of the Lightbox.modalHTML() function, but it doesn't play the FLV movie. instead it tries to download the FLV file to my computer, and the loading gif just keeps spinning

i'm also using Lightbox2 6.x-1.8 btw

thx

stella’s picture

Status: Active » Closed (fixed)

ncy: not at present, please open a separate feature request for the player customisation, etc.

elf_cash’s picture

Version: 5.x-2.8 » 5.x-2.x-dev

I have the JW Player installed and functioning correctly with the Lightbox 2 dev version(downloaded a few weeks ago). Everything works fine in all browsers except Internet Explorer. If the user's browser has pop ups blocked IE(7) attempts to download the flash file instead of playing it in the Lightbox with JW Player. If you go into the Internet Options --> Privacy --> Pop-Up Blocker and turn off the pop-up blocker, everything works fine in IE. It also works if you leave the blocker on and go into Pop-Up Blocker Settings and add the site url to the "allowed sites" list. I'm embedding the lightbox using the following html:

<div class="lightbox_thumbnail">
<a href="/files/welcome_2.flv" rel="lightvideo[width:500px;height:400px;]" title="Welcome!"><img src="/files/images/test.jpg" alt="Welcome!"><br>Welcome Video!</a>
<br>
</div>

Is there an alternate way to embed the lightbox video so that IE will not try to download the flash file?

stella’s picture

Not that I know of I'm afraid.

stella’s picture

Released in Lightbox2 6.x-1.9 and 5.x-2.9.

Cheers,
Stella

aliyayasir’s picture

Stella on my site videos are perfectly playing in lightbox2+ jwplayer in FF & GC but not working in IE 7&8. Any idea or solution.

thanks
Aly

小明’s picture

Project: Lightbox2 » JW Player
Version: 5.x-2.x-dev » 7.x-1.0-alpha1