You are here

mediaelement.admin.inc in MediaElement 6

Same filename and directory in other branches
  1. 7.2 mediaelement.admin.inc
  2. 7 mediaelement.admin.inc

File

mediaelement.admin.inc
View source
<?php

/**
 * Menu form callback; Display the MediaElement admin form.
 */
function mediaelement_admin_form() {
  $form = array();

  // Detect if the library is available. If it is not available display a
  // message.
  $libraries = libraries_get_libraries();
  if (!isset($libraries['mediaelement'])) {
    $form['message'] = array(
      '#value' => '<p>' . t('The MediaElement.js library is not installed. Please download the library from <a href="!url">MediaElementjs.com</a> and place it in your libraries folder.', array(
        '!url' => 'http://mediaelementjs.com',
      )) . '</p>',
    );
  }
  $form['mediaelement_sitewide'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable MediaElement.js site wide'),
    '#default_value' => variable_get('mediaelement_sitewide', FALSE),
  );
  $path = libraries_get_path('mediaelement');
  $form['test'] = array(
    '#value' => '<video width="360" height="203" id="player1" src="/' . $path . '/media/jsaddington.mp4"><p>Your browser leaves much to be desired.</p></video>',
  );
  return system_settings_form($form);
}

Functions

Namesort descending Description
mediaelement_admin_form Menu form callback; Display the MediaElement admin form.