function audiofield_players in AudioField 7
Implements hook_audiofield_players().
4 calls to audiofield_players()
- audiofield_admin_settings_form in ./
audiofield.admin.inc - Settings form for administering module.
- audiofield_field_formatter_settings_form in ./
audio.field.inc - Implements hook_field_formatter_settings_form().
- audiofield_field_formatter_settings_summary in ./
audio.field.inc - Implements hook_field_formatter_settings_summary().
- audiofield_field_formatter_view in ./
audio.field.inc - Implements hook_field_formatter_view().
File
- ./
audiofield.players.inc, line 11 - Declares the available audio players for the Audio Field module.
Code
function audiofield_players() {
$players = module_invoke_all('audiofield_players');
$players['html5'] = array(
'name' => 'HTML5 <audio>',
'filetypes' => array(
'mp3',
'wav',
'ogg',
'opus',
'webm',
'flac',
),
'local' => TRUE,
'callback' => 'audiofield_html5_audio',
);
$players['wpaudioplayer'] = array(
'path' => variable_get('audiofield_players_dir', 'sites/all/libraries/player') . "/audio-player/player.swf",
'name' => 'WordPress Audio Player',
'download_link' => 'http://wpaudioplayer.com/download',
'filetypes' => array(
'mp3',
),
'callback' => 'audiofield_wpaudioplayer',
);
$players['xspf_slim'] = array(
'path' => variable_get('audiofield_players_dir', 'sites/all/libraries/player') . "/xspf_player_slim.swf",
'name' => 'XSPF Slim Player',
'download_link' => 'http://prdownloads.sourceforge.net/musicplayer/xspf_player_slim-correct-0.2.3.zip?download',
'filetypes' => array(
'mp3',
),
'callback' => 'audiofield_xspf_slim',
);
$players['xspf_button'] = array(
'path' => variable_get('audiofield_players_dir', 'sites/all/libraries/player') . "/button/musicplayer.swf",
'name' => 'XSPF Button Player',
'download_link' => 'http://prdownloads.sourceforge.net/musicplayer/button_player-0.1.zip?download',
'filetypes' => array(
'mp3',
),
'callback' => 'audiofield_xspf_button',
);
// #1414398: Premium Beat players no longer available.
$players['premium_beat_single_track'] = array(
'path' => variable_get('audiofield_players_dir', 'sites/all/libraries/player') . "/playerSinglePackage/playerSingle.swf",
'name' => 'Premium Beat Single Player',
'filetypes' => array(
'mp3',
),
'callback' => 'audiofield_premium_beat_single_track',
);
// #1414398: Premium Beat players no longer available.
$players['premium_beat_thin'] = array(
'path' => variable_get('audiofield_players_dir', 'sites/all/libraries/player') . "/OriginalThinMusicPlayer.swf",
'name' => 'Premium Beat Thin Player',
'filetypes' => array(
'mp3',
),
'callback' => 'audiofield_premium_beat_thin',
);
// #1414398: Premium Beat players no longer available.
$players['premium_beat_mini'] = array(
'path' => variable_get('audiofield_players_dir', 'sites/all/libraries/player') . "/LWMusicPlayer.swf",
'name' => 'Premium Beat Mini Player',
'filetypes' => array(
'mp3',
),
'callback' => 'audiofield_premium_beat_mini',
);
$players['flowplayer'] = array(
'name' => 'Flowplayer',
'download_link' => 'http://drupal.org/project/flowplayer',
'filetypes' => array(
'mp3',
),
'callback' => 'audiofield_flowplayer',
'module' => 'flowplayer',
);
$players['soundmanager2'] = array(
'path' => variable_get('audiofield_players_dir', 'sites/all/libraries/player') . "/soundmanager2",
'name' => 'SoundManager2 360',
'download_link' => 'http://www.schillmania.com/projects/soundmanager2/',
'filetypes' => array(
'mp3',
'wav',
'ogg',
'opus',
'wav',
'flac',
),
'callback' => 'audiofield_soundmanager2_360player',
);
$players['soundmanager2_barui'] = array(
'path' => variable_get('audiofield_players_dir', 'sites/all/libraries/player') . "/soundmanager2",
'name' => 'SoundManager2 Bar UI',
'download_link' => 'http://www.schillmania.com/projects/soundmanager2/',
'filetypes' => array(
'mp3',
'wav',
'ogg',
'opus',
'wav',
'flac',
),
'callback' => 'audiofield_soundmanager2_baruiplayer',
);
$players['soundmanager2_button'] = array(
'path' => variable_get('audiofield_players_dir', 'sites/all/libraries/player') . "/soundmanager2",
'name' => 'SoundManager2 Inline',
'download_link' => 'http://www.schillmania.com/projects/soundmanager2/',
'filetypes' => array(
'mp3',
'wav',
'ogg',
'opus',
'wav',
'flac',
),
'callback' => 'audiofield_soundmanager2_buttonplayer',
);
$players['jplayer'] = array(
'path' => variable_get('audiofield_players_dir', 'sites/all/libraries/player') . "/jplayer/jquery.jplayer.min.js",
'css' => variable_get('audiofield_players_dir', 'sites/all/libraries/player') . "/jplayer/jplayer.css",
'name' => 'jPlayer',
'download_link' => 'https://www.drupal.org/project/jplayer',
'module' => 'jplayer',
'filetypes' => array(
'mp3',
'mp4',
'wav',
'ogg',
'oga',
'webm',
),
'callback' => 'audiofield_jplayer',
);
$players['wavesurfer'] = array(
'path' => variable_get('audiofield_players_dir', 'sites/all/libraries/player') . "/wavesurfer/dist/wavesurfer.min.js",
'name' => 'wavesurfer.js',
'download_link' => 'https://github.com/katspaugh/wavesurfer.js/',
'module' => 'jplayer',
'filetypes' => array(
'mp3',
'wav',
'ogg',
'oga',
),
'callback' => 'audiofield_wavesurfer_player',
);
return $players;
}