Hi!

First off, thanks so much for the audio module! It saved my life because we had to get a project done right away and there was the audio module already made! I even had fun customizing the flash part using the wonders of the XSPF Flash Player.

Only issue we are now seeing is that whole deal with Internet Explorer having to activate every flash object on a page. This is a real pain because people coming to the site don't understand why they would need to click twice because most of the time they don't notice the border - or they are scared away by it. (If you are not familiar with the IE activate issue see this article: http://blog.deconcept.com/2005/12/15/internet-explorer-eolas-changes-and...)

My request is that we use some method to load the object externally so that the activation does not appear. There are multiple options for this, but I would recommend SWFObject [http://blog.deconcept.com/swfobject/] as the most comprehensive and probably best solution. If this could be added into the audio module that would make it perfect in my eyes :)

.:Joshua

Comments

mediafrenzy’s picture

I would agree that this absolutely needs to be addressed!

Is everyone here using Flash aware that this Eolas/Microsoft patch has been pushed out to all XP/IE6 machines via Microsoft Updates, and that IE7 also has this built in?

The Object/Embed method of embedding Flash content is now crippled.

mediafrenzy’s picture

I also would suggest the SWFobject as being the method of choice. I've used it to fix Flash on all my sites without a hitch. (but I'm not quite sure how to go about doing this for the Audio module)

drewish’s picture

http://drupal.org/node/78717 has been marked as a duplicate of this.

personally, i'm not that interested in supporting IE (which is why this has been ignored) but if someone else writes a patch i'll review it and commit it.

mediafrenzy’s picture

I also am not at all keen on IE, and convert everyone I know to Firefox - however the bulk of my sites visitors are unfortunately still using IE6, and are totally confused by the IE/flash activation issue...

I use SWFobject for all my manually added single instance flash files, but I don't know how to set this up to work with a page full of php generated Flash audio Play buttons.

arthurf’s picture

I created a swfobject module for this. It allows developers to do something like:

print create_swfobject($url, $params);

you can download it here.

drewish’s picture

drewish’s picture

I've added this to the audio module FAQ.

discursives’s picture

Does this moduel work automagically with audio module? I see the reference in the audio FAQ, and I am reading this here now, but I am a little unclear on how to implement this. A little help? http://www.tunaspecial.com/?p=160

drewish’s picture

no, nothing's been changed. it still takes two clicks to start it in IE.

sgriffin’s picture

You can edit button.inc for example to output the correct code for swfobject or whatever you prefer..

<div id="$flashvars">
This text is replaced by the Flash movie.
</div>
<script type="text/javascript">
var so = new SWFObject("$url", "mymovie", "17", "17", "8", "#333333");
so.addParam("FlashVars", "$flashvars");
so.addParam("wmode", "transparent");
so.write("$flashvars");
</script>
EOT;

sgriffin’s picture

This follows $output = <<

drewish’s picture

what defines/incldues SWFObject?

sgriffin’s picture

Just install the swf object module.
I guess you could make a tick box on the audio settings, to change out the output here if the swf object module is installed.

sgriffin’s picture

This saves some text space for the div id stuff.

$output = <<
<div id="$node->id">
This text is replaced by the Flash movie.
</div>
<script type="text/javascript">

var so = new SWFObject("$url", "mymovie", "17", "17", "8", "#333333");
so.addParam("FlashVars", "$flashvars");
so.addParam("wmode", "transparent");
so.write("$node->id");
</script>
EOT;

firebus’s picture

swfaudio_api is kind of a moving target, there's a theme function now that you need to invoke if you want the module to add the swfobject js to the page.

here's what worked for me with 5.x-1.2-5, again in button.inc:

  $params = array('movie' => $url, 
                  'wmode' => 'transparent', 
                  'quality' => 'high',
                  'FlashVars' => $flashvars,
                  'width' => 17,
                  'height' => 17,
                  );
  $output = theme('swfobject_api', $url, $params); 
  return $output;
firebus’s picture

Version: 4.7.x-1.x-dev » 5.x-1.3

drewish, what kind of a patch are you interested in seeing?

i'm thinking of something like:

  • if swfobject_api is installed, provide an option on the settings page to use swfobject
  • update the various player.inc files to invoke swfobject if the swfobject setting is set.

i think that would be pretty straightforward...let me know if that works for you and i'll make a patch...

sgriffin’s picture

Ideally, you should go a little bit farther and use a dummy image of the player and then call a function to replace the image with the object onclick.

Or else if you have more than 30 or so instances in your view, it makes the browser sluggish and weird.

Like this ... the only issue I see if are the players,.. they usually have transparent bits, and the dummy images look weird if you put them on the wrong color background.

Only local images are allowed.

function setFlash( flashvars, divid )
{
var so = new SWFObject("/modules/audio/players/button.swf", divid, "17", "17", "8", "#333333");
so.addParam("FlashVars", "autoplay=true&"+flashvars);
so.addParam("wmode", "transparent");
so.write(divid);
}

mfer’s picture

I dealt with this at the theme level. Drupal and SWFObject have been moving targets. Here's what I did...
http://mattfarina.com/2007/05/02/removing-ies-click-activate-1pixelout-f...

The idea of having an image and replacing it with the player on click would bring up a similar issue as the click to activate. On click the image would be replaced by the flash player. Then, to start the player you'd need to click play. Unless you choose autostart on the player like the 1pixeloutplayer. What about players that don't have autostart?

What is the performance degradation of having all the players load on a page?

sgriffin’s picture

I had roughly 50-150 players on a page. It was difficult to scroll, and change to alternate tabs in ff.
If you don't have autostart.. well you would either live with the activation, or not put that many players on a page.
I guess, this is probably an issue, that should take an expert to implement.. since there are too many choices for this route.

But standard swf activation should be done

mfer’s picture

50 - 150 flash players on a page!?!?! Can you share the use case for that?

I'm not sure edge cases like that would be good to support in the module itself. I have never seen a site before that needed that.

For your average case of 1 - 30 I have never had an issue. Sure, it might take a second for all the players to load with 30 but the page is still usable. Compare that to the delay there would be on a page for javascript to change the elements, the player to load, and then it to start to play. I'd find that annoying.

With a little javascript and SWFObject what you are asking for wouldn't be hard to achieve. You might want to tackle this at the theme level.

sgriffin’s picture

Actually the javascript seemed to only work when the elements were visible. If you scrolled you could see it js replace the flash elements.
The only problem was the weirdness, or unpredictability it caused firefox.. Perhaps a memory issue with swfobject.
the site was soundzabound.com which is finished. As I said I replace the method with an onclick event and all is smooth as buttah.
I think the most instances were past the 200-300 mark. 4 cuts per track, 50 tracks a disc and 3 discs a volume on a page. Thats was a bit much.. :)
I did alter the code at the theme level for teasers and also in the inc, because that was outputted by a view.
The audio module is really nice.

Phillip Mc’s picture

just thought I'd mention that solution #15 by firebus worked perfectly for me for the audio.module.not only did itr remove the annoying "click to use this" IE issue, but, it also validates the html output for the player.

thanks firebus.