I'm trying to load a FLV file but keep getting a "swfobject is not defined" error in the console in firebug.

setup:

Drupal 6.14
jQuery Update 6.x-2.x-dev (update to jQuery 1.3.2)
Shadowbox 6.x-3.5

I downloaded shadowbox-build-3.0rc1 and installed it in sites/all/plugins/shadowbox

I've even downloaded the "mediaplayer" libraries and placed it within that shadowbox/libraries folder (as this is how I get it to play on NON drupal sites)

Shadowbox works fine when opening a webpage or image but NOT when I try to open an FLV file.

Here's a link

http://heartgard.avatarinteractive.ca/mickey

... click the last sentence "Watch the video to learn more about Mickey’s story", the HTML for that is ...

{ a href="/sites/default/files/heartworm.flv" rel="shadowbox;height=400;width=400" } Watch the video to learn more about Mickey’s story {/a} (obviously I'm using the prover tags instead of curly brackets in the actual page, I just don't want anything in this post to get hidden with HTML tags or something)

Why do I keep getting this swfobject not defined error? Why won't it open my FLV files??

Comments

psynaptic’s picture

Can you try with the latest DRUPAL-6--3? I just fixed an issue with the path and need to know if it's related or not.

If not, please do let me know. In this case, the resolution would likely be to install SWFTools module.

psynaptic’s picture

Status: Active » Fixed

2 weeks with no activity.

duntuk’s picture

Status: Fixed » Active

I'm having the same problem.

Drupal 6.15
Shadowbox 6.x-3.x-dev (2010-Jan-04)

followed install directions as specified

NOTE: this only stopped working for flv files.

It did work, however, an upgrade of drupal or shadowbox (at some point) broke flash video support--I was just notified of this today, so it could have happened during previous upgrades.

duntuk’s picture

Status: Active » Fixed

Ok confirmed not working in: Shadowbox 6.x-3.5 and Shadowbox 6.x-3.x-dev (2010-Jan-04)

I downgraded to shadowbox 6.x-3.0 and that plays flv just fine--i.e. everything works as expected.

psynaptic’s picture

Status: Fixed » Active

What do you mean it only stopped working for FLV files?

The only related changes I can think of are that Shadowbox itself has changed quite a bit between versions and we added a path setting in the footer:

<script type="text/javascript">
<!--//--><![CDATA[//><!--

      Shadowbox.path = Drupal.settings.basePath + "/sites/all/plugins/shadowbox-source-3.0b";
      Shadowbox.init(Drupal.settings.shadowbox);
    
//--><!]]>
</script>
duntuk’s picture

3.5+ doesn't play FLV videos for me, however, it opens up images just fine. Downgrading to 3.0, makes everything work (video and image files)

I haven't looked at the source code, however, if the path you posted above is hard coded, then that would make sense that it wouldn't work

/sites/all/plugins/shadowbox-source-3.0b

since the 3.5 install.txt indicates to install the shadowbox in

sites/all/libraries/shadowbox

also, shadowbox instructions indicate flv player is suppose to be installed in e.g. sites/all/libraries/shadowbox/libraries/player.swf

unzip the mediaplayer.zip file to your libraries directory. This should create a directory named mediaplayer with the player.swf

source: http://www.shadowbox-js.com/faq.html

again... 3.5 works with images, but does not work with .flv ... if i overwrite the content of 3.5 module with that of 3.0, everything works (images and flv)...

I haven't done a clean install, so not sure if that's causing the conflict.

Question: does 3.5 play flv video files for you? because i would be curious to hear of somebody who is successfully using the 3.5 version and JW FLV player together to play flv files.

sirkitree’s picture

Finding the same thing here: couldn't get .swf to load until i checked out 3.0 version instead of 3.5 of the module - latest release of the library though, 3.0rc1

psynaptic’s picture

Any idea why this is happening?

Could you check dev to see if it's fixed?

gageneau’s picture

oups ... sorry for that post ... found that my solution was already given here : http://drupal.org/node/630528

psynaptic’s picture

This is fixed in dev, just need to make a release. Seems most people don't try dev if something doesn't work!

psynaptic’s picture

This isn't fixed in dev! I'm having the problem with .swf files now.

naero’s picture

I, too, can confirm that the new dev version isn't fixing this issue. Please let me know how I can help out with testing!

mandclu’s picture

I've taken over development from anthonyvz and I can confirm that the solution posted in the thread identified in #9 does resolve the original issue at the top of this thread. Should this be closed and marked as a duplicate?

psynaptic’s picture

I'm a bit confused as to what needs doing. The other issue seems to have been fixed but activity here is more recent and it's definitely not fixed in dev.

psynaptic’s picture

Status: Active » Needs review

I have just committed a fix for this issue. Please could you test it and report if the problem is solved for you?

momentuminc’s picture

I was having the same problem (well, the same error message. I was having trouble playing a .swf). I installed the dev release and it is working appropriately now.

psynaptic’s picture

Status: Needs review » Fixed

Awesome! Thanks for testing :)

Status: Fixed » Closed (fixed)

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