Hi,
the default (background-)colors of Wordpress standalone player would be nice and decent (grey), but you hardcoded colors in your module, that will hardly ever fit on any site (red and blue).

Function in audiofield.players.inc with hardcoded colors: theme_audiofield_players_wpaudioplayer()

Please either leave default colors as-is, or provide a way to overwrite (hook or setting) your very special color decisions.

Comments

tamerzg’s picture

For now you can change the colors by overriding theme_audiofield_players_wpaudioplayer() function in your template.php

I ll leave this issue active, as a plan to add a way in admin configuration form to change the colors and other settings of players.

indigoxela’s picture

Hi tamerzg,
you are absolutely right, I forgot the theme hooks.

If somebody needs a code example, something like this would go to your themes' template.php

/*
 * returns the html for audiofield wordpress player
 */
function YOURTHEMENAME_audiofield_players_wpaudioplayer($variables) {
  $player_path = $variables['player_path'];
  $audio_file = $variables['audio_file'];
  return '<object class="wplayergrey" height="24" width="380" data="' . $player_path . '" type="application/x-shockwave-flash">
              <param value="' . $player_path . '" name="movie"/>
              <param value="playerID=2&amp;soundFile=' . $audio_file . '" name="FlashVars"/>
              <param value="high" name="quality"/>
              <param value="false" name="menu"/>
              <param value="transparent" name="wmode"/>
          </object>';
}

YOURTHEMENAME is of course the name of your theme.

An overview of possible player options is here: http://wpaudioplayer.com/standalone/

joegl’s picture

Issue summary: View changes

I just want to say that the above comment helped but as the code has changed in two years this is what I used:

function THEMENAME_audiofield_players_wpaudioplayer($variables) {
  $player_path = $variables['player_path'];
  $audio_file = $variables['audio_file'];
  return '<object class="audioplayer2" height="24" width="290" data="' . $player_path . '" type="application/x-shockwave-flash">
      <param value="' . $player_path . '" name="movie"/>
      <param value="playerID=2&amp;bg=0xFFFFFF&amp;leftbg=0xFFFFFF&amp;lefticon=0xFFFFFF&amp;rightbg=0xFFFFFF&amp;rightbghover=0xFFFFFF&amp;righticon=0xFFFFFF&amp;righticonhover=0xFFFFFF&amp;text=0x357DCE&amp;slider=0xFFFFFF&amp;track=0xFFFFFF&amp;border=0xFFFFFF&amp;loader=0xFFFFFF&amp;soundFile=' . $audio_file . '" name="FlashVars"/>
      <param value="high" name="quality"/>
      <param value="false" name="menu"/>
      <param value="transparent" name="wmode"/>
      </object>';
}

The hex codes are the 0xXXXXXX (leave the 0x in there and just change the hex color values). Color scheme info is at the bottom of the page here: http://wpaudioplayer.com/standalone/

AlanT’s picture

WOW! 3 years, and this still hasn't been fixed????

Looks like the only folks who can use media in Drupal are the coders. So far, this is the ONLY option that seems to work with multi-value filefields to give both player and download of files, and the color choice is horrendous!

Daniel.Moberly’s picture

Status: Active » Fixed

This has been fixed for quite some time.

Status: Fixed » Closed (fixed)

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