I do not see any flash player in Firefox, though during the brief span I had autoplay active I would spontaneously hear the sounds of my videos.

I do see it in Konqueror, and will be testing another browser or two tonight. I get an error message using swfobject2 embedding so I've been using the Direct Embedding mode.

This does not make sense to me, I'm hoping I've missed something obvious.

Comments

gettysburger’s picture

I am having the same experience. I am using 1 Pixel Out and it shows up in IE7 but not in Firefox 3.

Grayside’s picture

Tried again with fresh install, all default settings. Tested on a few more browsers:
Konqueror, Chrome, and IE 6 work. Firefox 3 does not.

Here is the source code:

<div class="swftools-wrapper generic-mp3"><div class="swftools">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="swf12368915941">
<param name="movie" value="/sites/all/modules/swftools/shared/generic/generic_mp3.swf">

<param name="allowScriptAccess" value="sameDomain">
<param name="wmode" value="opaque">
<param name="bgcolor" value="#FFFFFF">
<param name="scale" value="showall">
<param name="quality" value="autohigh">
<param name="align" value="l">
<param name="allowfullscreen" value="true">
<param name="base" value="/sites/dev-drupal.../files/">
<param name="play" value="true">
<param name="menu" value="false">
<param name="loop" value="true">
<param name="flashvars" value="file_url=/sites/dev-drupal.../files/Am%20I%20Evil%20-%20Zelda%20Jazz%20Mix.mp3&amp;autostart=false">
<!--[if gte IE 7]>-->
<object type="application/x-shockwave-flash" data="/sites/all/modules/swftools/shared/generic/generic_mp3.swf">
<param name="allowScriptAccess" value="sameDomain">
<param name="wmode" value="opaque">
<param name="bgcolor" value="#FFFFFF">

<param name="scale" value="showall">
<param name="quality" value="autohigh">
<param name="align" value="l">
<param name="allowfullscreen" value="true">
<param name="base" value="/sites/dev-drupal.../files/">
<param name="play" value="true">
<param name="menu" value="false">
<param name="loop" value="true">
<param name="flashvars" value="file_url=/sites/dev-drupal.../files/Am%20I%20Evil%20-%20Zelda%20Jazz%20Mix.mp3&amp;autostart=false">
<!--<![endif]-->
<p>You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialise correctly.</p>
<!--[if gte IE 7]>-->
</object>
<!--<![endif]-->
</object>
</div>
gettysburger’s picture

My non-Firefox-working source looks a lot like yours.

Comparing ours to geeksandgod.com and lullabot.com, they both have:
width="290" height="24"
...in the object. This is something neither of us have. Just a thought.

Nimo’s picture

What is the best way to add this code?

Stuart Greenfield’s picture

This sounds like for some reason the height and width isn't being set, or is being set to zero. With IE I think it still manages to put the object on the page properly (albeit oversized!), but with FF if there's no setting then it assumes zero.

Try forcing a height and width in case your auto-detection is failing.

E.g.

<swf file="myAudio.mp3" width="30" height="31">

Out of interest, how are you adding the content to the page? The posted code sample is clearly the generic media player, but when I use that with 6.x-1.3 then I get the height (30x31) added automatically.

gettysburger’s picture

I am using the code from the podcast at geeksandgod.com. I've put it in my node-audio.tpl.php file.

print swf($node->field_audio_file[0]['filepath']);

Using this model, would I put the height and width in my template.php file? Thanks.

Stuart Greenfield’s picture

Use

print swf($node->field_audio_file[0]['filepath'], array('params' => array('width' => '30', 'height' => '31')));

Don't forget the swf() syntax documentation page is available too.

gettysburger’s picture

Stuart,

That worked!!! Many thanks. This is awesome.

stormsweeper’s picture

Version: 6.x-1.3 » 6.x-2.3

Ugh, just caught this. I would suggest that SWF Tools set a default value for its default player, and the sub-player modules set their own defaults. I'll see about rolling a patch for this.

Stuart Greenfield’s picture

It's odd - there's a function in SWF Tools that tries to get the player size automatically (you can sneakily call image_get_info() with an swf, and it normally returns the size, even though it isn't an image).

I've not come across any reports of the function failing before now.

But yes, the players could provide a default size - I just never did that before as for some players the authors change the size etc, and it was a pain trying to keep up!

stormsweeper’s picture

I'm guessing it's due to the underlying PHP function getimagesize() - for me it's returning FALSE when presented with a SWF file. I'm using PHP 5.2.1

stormsweeper’s picture

Yes, it seems to be a PHP config issue:

Notice: getimagesize() [function.getimagesize]: The image is a compressed SWF file, but you do not have a static version of the zlib extension enabled.

Stuart Greenfield’s picture

@stormsweeper

Thanks for the pointer about this function failing if zlib isn't installed - I didn't realise that was a required extension for this to work!

It's not too hard to reinstate forced default sizes for media players, but it won't be helpful for users' own swf content. I can make the manual defaults fairly easily, so I'll put that back in.

I'll have to think this over to see if there's a workaround for custom swf files...

Stuart Greenfield’s picture

Status: Active » Needs review

OK - I have made two fixes, on to both DRUPAL-6--2 and HEAD.

First, the player modules now report their default size as part of the data they send when queried. If all other options fail (user didn't set a size and size detection failed) then swf() will fall back to the defaults. That should mean that players work irrespective of whether zlib is installed. It won't help for custom swf content, but for people who just want to upload mp3 / flv and have it work then this should be fine.

Since the autodetect feature can fail without zlib I have added it as requirement on in swftools.install so that it will produce a warning on the site status page, and the SWF Tools status page, if the library isn't present. The messages hopefully make clear that you can still use SWF Tools, but you might find auto size detection breaks sometimes.

Thanks for highlighting this - I seem to recall a post quite a long time ago where somewhere had content that inexplicably didn't appear, and I don't think it was ever solved first time round!

stormsweeper’s picture

It's working quite nicely for me.

Stuart Greenfield’s picture

Fixed in release 6.x-2.4.

Status page warns if zlib is not present, and players now report their size manually in case autodetection fails.

Stuart Greenfield’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

Todd Young’s picture

Just a post to the community that this is still an issue in certain cases where your SWF object is trying to pop up a dialogue that won't fit in the expected object size. For example, I have a video capture SWF that is trying to pop up the 'permission to use your webcam' security panel. It pops OK in IE and Chrome, but in Firefox I had to force a height and width as suggested above because firebug was telling me the height and width were '100%' - which meant about ten pixels high. After forcing the height, Firefox "print-swf()'d" my object.

I know this post is old but the issue still exists even in D6 v3-0 beta 5 so I figured I'd shine a light for anyone lost at sea like I've been for the past few hours.

juc1’s picture

StatusFileSize
new60.33 KB
new43.86 KB

@ Todd Young or anyone...

I think I am having this problem in v3-0 beta 5 -

In admin/settings/swftools/flowplayer3, my flowplayer3 canvas is set to 640px x 380px.

When my page http://redsand.org/mi loads in firefox there is no flowplayer and firebug shows flowplayer width = 100%, flowplayer height = 100% (attachment #1). If I change the width and height in firebug to pixels format then flowplayer shows up (attachment #2).

Any suggestions please for how to fix this?

Thank you