function mediaelement_library in MediaElement 7
Same name and namespace in other branches
- 7.2 mediaelement.module \mediaelement_library()
Implements hook_library().
File
- ./
mediaelement.module, line 30 - Provides HTML5 video and audio elements using Mediaelement.js.
Code
function mediaelement_library() {
$path = libraries_get_path('mediaelement');
$libraries = array();
$libraries['mediaelement'] = array(
'title' => 'Media Element',
'website' => 'http://mediaelementjs.com/',
'version' => '4',
'js' => array(
// The mediaelement script detects the path to itself to call other files
// in the same location. With preprocessing this is problematic as the
// script is no longer in the same directory as its other assets. There
// is an option that can be passed into the script with its location.
// @todo Update all calls to mediaelement to pass in the assets location.
$path . '/build/mediaelement-and-player.min.js' => array(
'group' => JS_LIBRARY,
'preprocess' => FALSE,
),
),
'css' => array(
$path . '/build/mediaelementplayer.min.css' => array(
'group' => CSS_SYSTEM,
),
),
);
return $libraries;
}