function osmplayer_library in MediaFront 7.2
Implements hook_library
File
- players/
osmplayer/ osmplayer.module, line 290
Code
function osmplayer_library() {
// Setup the options for the js inclusion.
$options = array(
'group' => JS_LIBRARY,
);
// Get the osmplayer path.
$path = drupal_get_path('module', 'osmplayer') . '/player';
$libraries = array(
'minplayer' => array(
'title' => 'minPlayer',
'version' => '0.1',
'js' => array(
$path . '/minplayer/bin/minplayer.compressed.js' => $options,
),
'dependencies' => array(
array(
'system',
'ui.slider',
),
),
),
'minplayer_debug' => array(
'title' => 'minPlayer (Debug Mode)',
'version' => '0.1',
'js' => array(
$path . '/minplayer/src/minplayer.compatibility.js' => $options,
$path . '/minplayer/src/minplayer.flags.js' => $options,
$path . '/minplayer/src/minplayer.async.js' => $options,
$path . '/minplayer/src/minplayer.plugin.js' => $options,
$path . '/minplayer/src/minplayer.display.js' => $options,
$path . '/minplayer/src/minplayer.js' => $options,
$path . '/minplayer/src/minplayer.image.js' => $options,
$path . '/minplayer/src/minplayer.file.js' => $options,
$path . '/minplayer/src/minplayer.playLoader.js' => $options,
$path . '/minplayer/src/minplayer.players.base.js' => $options,
$path . '/minplayer/src/minplayer.players.html5.js' => $options,
$path . '/minplayer/src/minplayer.players.flash.js' => $options,
$path . '/minplayer/src/minplayer.players.minplayer.js' => $options,
$path . '/minplayer/src/minplayer.players.youtube.js' => $options,
$path . '/minplayer/src/minplayer.players.vimeo.js' => $options,
$path . '/minplayer/src/minplayer.players.dailymotion.js' => $options,
$path . '/minplayer/src/minplayer.players.limelight.js' => $options,
$path . '/minplayer/src/minplayer.players.kaltura.js' => $options,
$path . '/minplayer/src/minplayer.controller.js' => $options,
),
'dependencies' => array(
array(
'system',
'ui.slider',
),
),
),
'osmplayer' => array(
'title' => 'OSM Player',
'version' => '0.1',
'js' => array(
drupal_get_path('module', 'osmplayer') . '/osmplayer_drupal.js' => $options,
$path . '/bin/osmplayer.compressed.js' => $options,
),
'dependencies' => array(
array(
'system',
'ui.slider',
),
),
),
'osmplayer_debug' => array(
'title' => 'OSM Player (Debug Mode)',
'version' => '0.1',
'js' => array(
drupal_get_path('module', 'osmplayer') . '/osmplayer_drupal.js' => $options,
$path . '/src/osmplayer.js' => $options,
$path . '/src/osmplayer.parser.default.js' => $options,
$path . '/src/osmplayer.parser.youtube.js' => $options,
$path . '/src/osmplayer.parser.rss.js' => $options,
$path . '/src/osmplayer.parser.asx.js' => $options,
$path . '/src/osmplayer.parser.xspf.js' => $options,
$path . '/src/osmplayer.playlist.js' => $options,
$path . '/src/osmplayer.pager.js' => $options,
$path . '/src/osmplayer.teaser.js' => $options,
),
'dependencies' => array(
array(
'osmplayer',
'minplayer_debug',
),
),
),
);
// Get the player information.
$info = osmplayer_get_info();
// Add all of the templates to the libraries.
foreach ($info['templates'] as $template => $info) {
$libraries['osmplayer_' . $template] = array(
'title' => 'OSM Player (' . $template . ')',
'version' => '0.1',
'js' => $info['js'],
'css' => $info['css'],
'dependencies' => array(
array(
'osmplayer',
'osmplayer',
),
),
);
$libraries['osmplayer_' . $template . '_debug'] = array(
'title' => 'OSM Player (' . $template . '): Debug',
'version' => '0.1',
'js' => $info['js'],
'css' => $info['css'],
'dependencies' => array(
array(
'osmplayer',
'osmplayer_debug',
),
),
);
}
return $libraries;
}