You are here

function videojs_settings_form in Video.js (HTML5 Video Player) 7.2

Same name and namespace in other branches
  1. 6.2 includes/videojs.admin.inc \videojs_settings_form()
  2. 6 includes/videojs.admin.inc \videojs_settings_form()
  3. 7.3 includes/videojs.admin.inc \videojs_settings_form()
  4. 7 includes/videojs.admin.inc \videojs_settings_form()

Menu callback; Provides the Video.js settings form.

2 string references to 'videojs_settings_form'
videojs_hls_form_alter in modules/videojs_hls/videojs_hls.module
videojs_menu in ./videojs.module
Implements hook_menu().

File

includes/videojs.admin.inc, line 10
Administrative pages for the Video.js module.

Code

function videojs_settings_form() {
  $form = array();
  $form['videojs_directory'] = array(
    '#type' => 'textfield',
    '#title' => t('Video.js file directory'),
    '#default_value' => variable_get('videojs_directory', 'sites/all/libraries/video-js'),
    '#description' => t('Specify the path that contains the Video.js library. The video.js file should be in the root of this directory.'),
  );
  $form['options'] = array(
    '#type' => 'fieldset',
    '#title' => t('Video.js options'),
    '#collapsible' => FALSE,
  );
  $form['options']['videojs_autoplay'] = array(
    '#type' => 'checkbox',
    '#title' => t('Auto-play files on page load'),
    '#description' => t('Use caution when combining this option with multiple players on the same page.'),
    '#default_value' => variable_get('videojs_autoplay', ''),
  );
  $form['options']['videojs_width'] = array(
    '#type' => 'textfield',
    '#title' => t('Player width'),
    '#default_value' => variable_get('videojs_width', 640),
  );
  $form['options']['videojs_height'] = array(
    '#type' => 'textfield',
    '#title' => t('Player height'),
    '#default_value' => variable_get('videojs_height', 360),
  );
  $form = system_settings_form($form);
  $form['#validate'][] = 'videojs_settings_form_validate';
  $form['#submit'][] = 'videojs_settings_form_submit';
  return $form;
}