audio_get_players

Versions
6
audio_get_players($op = 'names', $name = '')

Return information on the installed player plugins.

Parameters

$op String specifying the operation. Possible values are: 'formats' 'format' 'names' 'name'

$name Name of a specific player, used with $op = 'format' or 'name'.

▾ 5 functions call audio_get_players()

audio_admin_settings_players in contributions/audio/audio.admin.inc
Form for player settings.
audio_get_node_player in contributions/audio/audio.module
Build HTML to play an audio node.
audio_theme in contributions/audio/audio.module
Implementation of hook_theme
audio_views_tables in contributions/audio/audio.views.inc
theme_audio_feeds_views_xspf in contributions/audio/contrib/feeds/audio_feeds.views.inc
Theme function to handle the XSPF view

Code

contributions/audio/audio.module, line 1064

<?php
function audio_get_players($op = 'names', $name = '') {
  static $_player_name, $_player_format;

  if (!isset($_player_format)) {
    list($_player_name, $_player_format) = _audio_player_build_list();
  }

  switch ($op) {
    case 'formats':
      return $_player_format;
    case 'format':
      if (isset($_player_format[$name])) {
        return $_player_format[$name];
      }
      return FALSE;
    case 'names':
      return $_player_name;
    case 'name':
      if (isset($_player_name[$name])) {
        return $_player_name[$name];
      }
      return FALSE;
    default:
      return FALSE;
  }
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.