My triangle play button on playlist has quit working. It is displayed but when I click on it, it shows download animation and that's it. The popup player plays audio just fine, but not the one in playlist. I have ID3 enabled. Please help.

Comments

sandy-jr’s picture

Status: Active » Closed (fixed)

I just uploaded an older back of the site and it fixed the problem. I still don't what could have caused, I suspect it was getid3 module thou.

blantz’s picture

Status: Closed (fixed) » Active

(I'm not sure why this issue was closed if the issue was not taken care of.)

I've downloaded all of the current 4.7 official and dev releases and they all have this issue: I can download and play the audio file but if I try to play it through the flash player the flash player just spins and does nothing, this just started happening after I upgraded to drupal-4.7.7.

Thanks, having an embedded play button is really nice, I've always thought that was a great touch.

blantz’s picture

It looks like the url encoding that is embedded in the player is getting garbled, in my case this is the url:
http://community.freespeech.org/modules/audio/players/mp3.swf?song_url=h...
(http%3A/%252F should be http%3A%2F%2F)

blantz’s picture

Status: Active » Closed (fixed)

It appears the problem is with drupal_urlencode(). drupal_urlencode() seems to be garbling the url encoding when clean urls are enabled.

old version that worked:
return str_replace(array('%2F', '%26', '%23'),
array('/', '%2526', '%2523'),
urlencode($text));

new version that garbles the url:
return str_replace(array('%2F', '%26', '%23', '//'),
array('/', '%2526', '%2523', '/%252F'),
urlencode($text));

sandy-jr’s picture

Thanks Redbike for digging into this issue. So did you just paste the code from 4.7.6 into your 4.7.7 and it started working? Where is that code exactly located? Thanks again.

miiimooo’s picture

Thanks to the post above here's what fixed the problem:

in audio.theme

$url = $base_url .'/'. drupal_get_path('module', 'audio') .'/players/mp3.swf';
// hack
// if ($options) {
// $url .= '?'. drupal_query_string_encode($options);
// }
foreach($options as $k=>$v) {
$params[] = $k."=".$v;
}
$url .= '?' . implode('&',$params);

jmcclelland’s picture

The above fix worked for me too.

And, to be a bit more descriptive about how to apply the fix:

The top line in the fix should be left as is.

The lines that are commented out should be commented out in the module.

The lines after the commented out lines are new lines that should be added.

Here's another representation of the changes needed:

--- audio.theme.orig    2006-12-23 01:24:53.000000000 -0500
+++ audio.theme 2007-10-30 10:23:29.000000000 -0400
@@ -165,9 +165,11 @@
   ));
 
   $url = $base_url .'/'. drupal_get_path('module', 'audio') .'/players/mp3.swf';
-  if ($options) {
-    $url .= '?'. drupal_query_string_encode($options);
-  }
+
+       foreach($options as $k=>$v) {
+               $params[] = $k."=".$v;
+       }
+       $url .= '?' . implode('&',$params);
 
   $output = '<object type="application/x-shockwave-flash" data="'. $url .'" width="17" height="17">';
   $output .= '<param name="movie" value="'. $url .'" />';