You are here

function jw_player_libraries_info in JW Player 7.2

Same name and namespace in other branches
  1. 8 jw_player.module \jw_player_libraries_info()

Implements hook_libraries_info()

File

./jw_player.module, line 845
Adds a theme function which allows theme developers to use the JW Player.

Code

function jw_player_libraries_info() {
  $libraries = array(
    'jwplayer' => array(
      'name' => 'JW Player',
      'vendor url' => 'http://www.jwplayer.com/',
      'download url' => 'http://www.jwplayer.com/download',
      'files' => array(
        'js' => array(
          'jwplayer.js' => array(
            'preprocess' => FALSE,
          ),
        ),
      ),
      'integration files' => array(
        'jw_player' => array(
          'js' => array(
            'js/jw_player.seek.js',
          ),
        ),
      ),
      'callbacks' => array(
        'post-load' => array(
          'jw_player_libraries_load',
        ),
      ),
    ),
  );

  // Parse version from JS file for older versions.
  if (jw_player_use_legacy()) {
    $libraries['jwplayer']['version arguments'] = array(
      'file' => 'jwplayer.js',
      'pattern' => '/jwplayer.version="(.*?)"/',
      'lines' => 1,
    );
  }
  else {

    // Version of JWPlayer 7 and above can't be parsed the same way anymore.
    $libraries['jwplayer']['version'] = 7;
  }
  return $libraries;
}