You are here

function _jplayer_get_css in jPlayer 7.2

Return a CSS array for the theme.

So far only one skin is acceptable because the HTML is different. Keeping it for the future..

"See your future, be your future. May. make. make it. Make your future Danny"

Return value

array CSS array.

1 call to _jplayer_get_css()
_jplayer_js_attach in ./jplayer.module
Add core JS and CSS needed for jPlayer instances.

File

./jplayer.module, line 406
Provides an HTML5-compatible with Flash-fallback audio player.

Code

function _jplayer_get_css() {
  $return = array();
  $opts = array(
    'type' => 'file',
    'group' => CSS_DEFAULT,
  );

  // Right now only the default skin (module) is avaialble.
  $skin = NULL;
  if (!$skin) {
    $path = drupal_get_path('module', 'jplayer');
    return array(
      $path . '/theme/jplayer.css' => $opts,
    );
  }
  else {
    $lib = libraries_get_path('jplayer') . '/skin/' . $skin;
    $file = $lib . '/' . $skin . '.css';
    if (file_exists($file)) {
      $return = array(
        $file => $opts,
      );
    }
    else {
      $skin = 'jplayer.' . $skin;
      $file = $lib . '/' . $skin . '.css';
      if (file_exists($file)) {
        $return = array(
          $file => $opts,
        );
      }
    }
  }
  return $return;
}