function audiofield_soundmanager2_baruiplayer in AudioField 7
Callback function for AudioField SoundManager2 Bar UI player.
1 string reference to 'audiofield_soundmanager2_baruiplayer'
- audiofield_players in ./
audiofield.players.inc - Implements hook_audiofield_players().
File
- ./
audiofield.players.inc, line 365 - Declares the available audio players for the Audio Field module.
Code
function audiofield_soundmanager2_baruiplayer($player_path, $audio_file, $options) {
$audio_title = $audio_file;
if (!empty($options)) {
if (!empty($options['item']['description'])) {
$audio_title = $options['item']['description'];
}
elseif (!empty($options['item']['filename'])) {
$audio_title = $options['item']['filename'];
}
}
$player_base_path = variable_get('audiofield_players_dir', 'sites/all/libraries/player') . "/soundmanager2";
drupal_add_js($player_base_path . '/script/soundmanager2.js', array(
'weight' => 0,
));
// Add Bar UI javascript.
drupal_add_js($player_base_path . '/demo/bar-ui/script/bar-ui.js', array(
'weight' => 1,
));
// Add Bar UI style.
drupal_add_css($player_base_path . '/demo/bar-ui/css/bar-ui.css');
return theme('audiofield_players_soundmanager2_baruiplayer', array(
'audio_file' => file_create_url($audio_file),
'audio_title' => $audio_title,
));
}