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
Comment #1
mediafrenzy commentedI 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.
Comment #2
mediafrenzy commentedI 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)
Comment #3
drewish commentedhttp://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.
Comment #4
mediafrenzy commentedI 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.
Comment #5
arthurf commentedI created a swfobject module for this. It allows developers to do something like:
you can download it here.
Comment #6
drewish commentedhttp://drupal.org/node/91472 is a dupe of this
Comment #7
drewish commentedI've added this to the audio module FAQ.
Comment #8
discursives commentedDoes 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
Comment #9
drewish commentedno, nothing's been changed. it still takes two clicks to start it in IE.
Comment #10
sgriffin commentedYou 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;
Comment #11
sgriffin commentedThis follows $output = <<
Comment #12
drewish commentedwhat defines/incldues SWFObject?
Comment #13
sgriffin commentedJust 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.
Comment #14
sgriffin commentedThis 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;
Comment #15
firebus commentedswfaudio_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:
Comment #16
firebus commenteddrewish, what kind of a patch are you interested in seeing?
i'm thinking of something like:
i think that would be pretty straightforward...let me know if that works for you and i'll make a patch...
Comment #17
sgriffin commentedIdeally, 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.
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);
}
Comment #18
mfer commentedI 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?
Comment #19
sgriffin commentedI 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
Comment #20
mfer commented50 - 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.
Comment #21
sgriffin commentedActually 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.
Comment #22
Phillip Mc commentedjust 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.