You are here

function mediaelement_init in MediaElement 7

Same name and namespace in other branches
  1. 6 mediaelement.module \mediaelement_init()
  2. 7.2 mediaelement.module \mediaelement_init()

Implements hook_init().

File

./mediaelement.module, line 56
Provides HTML5 video and audio elements using Mediaelement.js.

Code

function mediaelement_init() {

  // When the media player is set to be on all pages add it to the page.
  if (variable_get('mediaelement_sitewide', FALSE)) {
    drupal_add_library('mediaelement', 'mediaelement');
    drupal_add_js(drupal_get_path('module', 'mediaelement') . '/mediaelement.js');
    drupal_add_js(array(
      'mediaelementAll' => TRUE,
    ), array(
      'type' => 'setting',
    ));
  }
}