'audio', 'title' => t('1pixelout Flash player'), 'formats' => array('wav', 'mp3'), 'theme' => 'audio_1pixelout_player', 'description' => t('Written by Martin Laine as part of the Wordpress Audio Player plugin.'), 'url' => t('http://www.1pixelout.net/code/audio-player-wordpress-plugin/'), ); return $items; } /** * @param $node * node object * @param $options * array of options to pass to the player. This allows you to override the * any parameter passed to the player including colors, title, * @return * HTML string with a flash player */ function theme_audio_1pixelout_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('soundFile' => $node->url_play) ); $params = array(); foreach ($options as $key => $val) { $params[] = rawurlencode($key) .'='. rawurlencode($val); } $params = implode('&', $params); $url = $base_url .'/'. drupal_get_path('module', 'audio') .'/players/1pixelout.swf'; $output = << EOT; return $output; }