You are here

function mediaelement_library in MediaElement 7.2

Same name and namespace in other branches
  1. 7 mediaelement.module \mediaelement_library()

Implements hook_library().

File

./mediaelement.module, line 52
Provides HTML5 video and audio elements using Mediaelement.js for HTML4 browsers.

Code

function mediaelement_library() {
  $path = libraries_get_path('mediaelement');
  $libraries = array();
  $libraries['mediaelement'] = array(
    'title' => 'Media Element',
    'website' => 'http://mediaelementjs.com/',
    'version' => '2.1.6',
    '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;
}