You are here

function audiofield_wpaudioplayer in AudioField 7

Callback function for AudioField WordPress standalone player.

1 string reference to 'audiofield_wpaudioplayer'
audiofield_players in ./audiofield.players.inc
Implements hook_audiofield_players().

File

./audiofield.players.inc, line 235
Declares the available audio players for the Audio Field module.

Code

function audiofield_wpaudioplayer($player_path, $audio_file) {

  // Add the javascript which renders the player.
  drupal_add_js(variable_get('audiofield_players_dir', 'sites/all/libraries/player') . '/audio-player/audio-player.js', array(
    'type' => 'file',
    'scope' => 'footer',
    'group' => JS_LIBRARY,
    'weight' => 0,
  ));
  drupal_add_js(drupal_get_path('module', 'audiofield') . '/js/wordpress.builder.js', array(
    'type' => 'file',
    'scope' => 'footer',
    'group' => JS_LIBRARY,
    'weight' => 10,
  ));
  return theme('audiofield_players_wpaudioplayer', array(
    'id' => drupal_html_id('audiofield-wordpress-player'),
    'audio_file' => file_create_url($audio_file),
  ));
}