http://sitename.com/modules/audio/players/mp3.swf?song_url=http%3A%2F%2Fsitename.com%2Faudio%2Fplay%2F13&song_title=Song%20Title

Removing url encoding in the bolded section fixes the problem.

Comments

ngstigator’s picture

I've replaced the function "theme_audio_mp3_player" in audio.theme with the following code (just added switch to only rawurlencode url parameters):

function theme_audio_mp3_player($node, $options = array()) {
  global $base_url;

  // flash only supports a limited range of sample rates.
  switch ($node->audio_fileinfo['sample_rate']) {
    case '44100': case '22050': case '11025':
      break;
    default:
      return;
  }

  $options = array_merge((array) $options, array(
    'song_url' => $node->url_play,
    'song_title' => $node->audio_tags['title'],
  ));

  $params = array();
  foreach ($options as $key => $val) {
		switch ($key) {
			case "song_title":
		    $params[] = $key .'='. rawurlencode($val);
				break;
			default:
		    $params[] = $key .'='. $val;
		}
  }

  $url = $base_url .'/'. drupal_get_path('module', 'audio') .'/players/mp3.swf';
  if ($params) {
    $url .= '?'. implode('&', $params);
  }

  $output = '<object type="application/x-shockwave-flash" data="'. $url .'" width="17" height="17">';
  $output .= '<param name="movie" value="'. $url .'" />';
  $output .= '<param name="wmode" value="transparent" />';
  $output .= '</object>';

  return $output;
}

Now I can paste the entire url in the data attribute of the object tag (of page source) into firefox address bar and the flash player will play. However, it still will not play when embedded into Drupal.

ngstigator’s picture

Just found out that the problem is an "overflow: auto" style attribute.

Nothing to see here.

drewish’s picture

Status: Active » Closed (fixed)

then i'm assuming we can close this?