I've spent quite a few hours trying to get my flash videos (.flv) to play in Shadowbox. After much hair loss and reading (and re-reading) of similar problems in the issue queue, I finally got it working!
I thought I'd share my thoughts here for anyone that was having similar issues and/or so the documentation can be updated.

1 - Install and configure the latest 3.x-dev version of Shadowbox (there were issues with previous versions - a new release would be great!)

2 - Download and install the JW Player, following these instruction (under the "How do I use the JW FLV player to play Flash video?" question)

3 - Add rel="shadowbox;width=x;height=y;" to your link's <a> tag (replacing 'x' & 'y' with with width and height of your video)

That should do the trick. Feel free to let me know if I've forgotten something.

Comments

john54’s picture

Very helpful for you to share this information.

Fair to say that of all my many modules in Drupal that Shadowbox is in my opinion an incredible module but also the one that demands the most attention to get or keep it working.

Please note that the instructions that you pointed to (on the shadowbox site) are a release behind, when they mention mediaplayer.zip they refer to release 4.

The JW Player is now release 5 and the zip file is mediaplayer-viral.zip, the directory is now mediaplayer-viral and the swf file is player-viral.swf

Dropped the mediaplayer-viral directory into the libraries directory and all worked perfectly.

paulybarnes’s picture

To take this one step further:

1) Download the JW Player

2) Unzip it and install it into your /modules/Shadowbox/libraries folder

3) Then the command should be (a href="MyVideo.flv" rel="shadowbox;width=x;height=y;") Like the above post mentioned

Step 2 is where I was getting confused. I was placing items in sites/all/libraries...Don't be me and survive frustration.

Anonymous’s picture

The JW Player is now release 5 and the zip file is mediaplayer-viral.zip, the directory is now mediaplayer-viral and the swf file is player-viral.swf

When you download JW Player from the Longtail site, there's a checkbox that says "Include Viral, a video sharing plugin" - untick it to get the non-viral version as per the instructions.

2) Unzip it and install it into your /modules/Shadowbox/libraries folder

Thanks, that would cause confusion :)

psynaptic’s picture

I'd happily take patches or even better a handbook page dedicated to this module.

I know it's been a bit of a rough ride and I'm sincerely sorry to all the users this has inconvenienced. I do wish more people would directly contribute though, afterall, this is what open source is all about.

Avalanche’s picture

I'd like to share something I've learned today - I'm not much of a programmer, so hopefully this helps some other folks in the same boat.

I wanted to have an image that could be clicked and would in turn load an interactive Flash document into Shadowbox. However, I couldn't figure out how to do this in HTML. So I made an image linked to an HTML file that was generated by Adobe Flash, which in turn calls the SWF.

Unfortunately, ShadowBox didn't want to size properly to the SWF, which is 950px by 600px. A white space kept appearing around my SWF to the right and bottom, which effectively kept Shadowbox at about 1200px by 800px. Reading the above information on what to add to the rel="shadowbox" was really helpful. And, I didn't need to add any other players.

Here's what my code came out to:
<span style="float: left; border: 1px solid #C4E5E9; background: #F1F8F9; width: 338px; height:350px; margin: 5px; padding: 2px 2px 20px 2px;"><a href="/sites/default/files/project.html" rel="shadowbox; width=950; height=600;"><img src="/sites/default/files/image.png" style="FLOAT: left; BORDER: 1px solid #C4E5E9; width=300; height=300;">Interactive Graphic</a>Information</span>

Now the the auto-generated HTML page from Adobe Flash automatically detects the flash player type and adds a loading spinner while my interactive map loads. And, best of all, everything is sized correctly. Happy days!

The only problem I noticed is that if someone zooms in on their browser (ctrl +), then it adds scroll bars to the Shadowbox. I have no idea how Shadowbox would know to compensate for that.

Someone above said that Shadowbox had been kinda troublesome for them to maintain. Not to disregard their experiences, but I'm personally very pleased with the results. I tried using Lightbox2, but as soon as I turned on the module it hijacked every link on my site that I clicked on with my mouse. It took me a while to disable the module using the tab key on my keyboard. I like how nimble Shadowbox is, for my needs.

Anonymous’s picture

Hello, I have been searching for days trying to figure out how to add rel="shadowbox to my player. My video config is set up with a custom node.tpl.php (node-media.tpl.php) so that I could add a splash image over the video and hide the play button. I have swf tools set up for the player but dont have to add the "swf file=" code in the body of the node to print the player.

Im stuck and completely lost on step 3 above where it says:
"Then the command should be (a href="MyVideo.flv" rel="shadowbox;width=x;height=y;") ???

what command? where is it?

I tried using the regular node.tpl.php, uploaded the file and used "swf file=" in the body of the node and altered that with the rel tag 20 different ways to no avail.

I create the video in the newly created content type by uploading as a file attachment. So my question is how exactly and where is the anchor tag to add the rel attribute. The video is local and not third party. What am I doing wrong. This is driving me up a wall. Any help is greatly appreciated. thanks.

W.M.’s picture

One simple question: What about swf files ?! How to load them inside a shadowbox?! Thanks.

manfer’s picture

It is recommended to use the 6.x-4.x version for drupal 6 sites.

When you download the shadowbox library don't forget to include all players you plan to use. If you are unsure just download shadowbox library with all its players: images, External sites and pages, Inline and/or dynamic HTML, Flash (swf files), Flash video (flv files), QuickTime and Windows Media Player. http://www.shadowbox-js.com/download.html

Then opening a .flv or .swf file in shadowbox is straightforward just adding to the link the rel="shadowbox width=640; height=480;" attribute. For any media except for images expecifying the size in rel attribute is mandatory, so don't forget to include it.

manfer’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

apexvideo’s picture

Category: task » support
Priority: Normal » Major
Status: Closed (fixed) » Active

Hey all,

Thanks for all the knowledge from above. I am excited to try and incorporate Shadowbox to display my flash video files on my website.

This may be an obviously easy question, but where is the /modules/Shadowbox/libraries folder?

If someone can help me out, it would be greatly appeciated.

Thanks

apexvideo’s picture

Here is a link that should answer any questions on this topic

http://www.longtailvideo.com/support/forums/jw-player/setup-issues-and-e...

kim_charest’s picture

Hi,

I guess I'm doing something wrong... Shadowbox is enabled, I've configured it as well to be activated on the desired test page. I've installed the JW Player file in my ../modules/Shadowbox/libraries folder. I then added, as mentioned on the first posts, the following code to my node:

<a href="http://exploitationsexuelle.com/sites/default/files/videos/original/jacques_dupuis.flv" rel="shadowbox;width=470;height=320" title="Video Title">Entrevue avec Jacques Dupuis, ex-ministre de la Sécurité publique et de la Justice</a>

It still doesn't work. Any ideas?

Thanks a lot in advance!!

kim_charest’s picture

Oh and just to specify: the link actually appears, but when I click on it, it just directly opens the file as a usual download. I've been asking for support on the Shadowbox forum as well as in the Drupal's Shadowbox forum and haven't got any answers yet... Hopefully someone here will be able to help me :)

manfer’s picture

I think you are not installing the module correctly. There is no need to install JW Player anywhere because it comes with shadowbox library and that's what you have to install and not the JW Player (if you wish you can update it later as the JW Player version that comes with shadowbox javascript library is not the last version).

To install this module you need:

Notice clearly these are two different things and both are needed.

When you download the shadowbox javascript library be sure to choose as adapter jquery (or the base standalone one would work either) and I suggest to check all the players available: Images, External sites and pages, Inline and/or dynamic HTML, Flash (swf files), Flash video (flv files), QuickTime, Windows Media Player.

Once you have those two files you must install drupal shadowbox module as you do with any other module, just uploading it to your "/sites/all/modules" folder. And you have to upload the shadowbox javascript library to "/sites/all/libraries". The name of the folder of the shadowbox javascript library is shadowbox-3.0.3 so you will finish with a folder "/sites/all/libraries/shadowbox-3.0.3" that contains all of the shadowbox javascript library files. It is better if you rename this folder to shadowbox removing the -3.0.3, as that is the name that the module expects (otherwise you would need to configure that path in the module config page).

After you have uploaded both the drupal shadowbox module and the shadobox javascript library, then you can just start using shadowbox.

If you want to include a shadowbox link like the one in your example in an article, a page, ..., if it is in a drupal 7 site, you must configure shadowbox module to be included in all pages of your site. Just go to "/admin/config/media/shadowbox/automatic" and check the "Enable shadowbox globally" configuration option. For a drupal 6 site this is not needed as shadowbox is included by default in all pages.

The link in your example:

<a href="http://exploitationsexuelle.com/sites/default/files/videos/original/jacques_dupuis.flv" rel="shadowbox;width=470;height=320" title="Video Title">Entrevue avec Jacques Dupuis, ex-ministre de la Sécurité publique et de la Justice</a>

should work as long as both the module and javascript library are installed correctly and the Flash video (flv files) player has been added when you download the shadowbox javascript library (if you choose all players you don't have any problem as this is one of them) and the video is located in that path you specified in href.

To check if shadowbox is working there is a test link in the configuration page that can be located in "/admin/config/media/shadowbox" in a drupal 7 site and in "/admin/settings/shadowbox" in a drupal 6 site. Just click the "Test shadowbox with current settings" link and a shadowbox should appear showin a sample image inside the shadowbox.

Just a question, where is "Drupal's Shadowbox forum"? This is the official drupal shadowbox module forum for support requests, feature requests and bug reports.

manfer’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

James Crothers’s picture

Status: Closed (fixed) » Active

I am using an array to display six videos but I am having a problem calling the files.

path to files/ print $node->field_video_video[0]['filename'] " rel="shadowbox;height=338;width=600"> path to files/Only local images are allowed. print $node->field_video_thumb[0]['filename'] ">

But all I am getting broken links, any idea?

manfer’s picture

Status: Active » Closed (fixed)