function jw_player_libraries_info in JW Player 8
Same name and namespace in other branches
- 7.2 jw_player.module \jw_player_libraries_info()
Implements hook_libraries_info().
File
- ./
jw_player.module, line 125 - 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(),
),
),
),
);
// 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;
}