function videojs_settings_form in Video.js (HTML5 Video Player) 7.3
Same name and namespace in other branches
- 6.2 includes/videojs.admin.inc \videojs_settings_form()
- 6 includes/videojs.admin.inc \videojs_settings_form()
- 7 includes/videojs.admin.inc \videojs_settings_form()
- 7.2 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['location'] = array(
'#type' => 'fieldset',
'#title' => t('Video.js location'),
'#collapsible' => FALSE,
);
$locations = array(
'cdn' => t('Video.js Content Delivery Network (CDN)'),
'path' => t('Specified path'),
);
if (module_exists('libraries')) {
$locations['libraries'] = t('Libraries API');
}
$form['location']['videojs_location'] = array(
'#type' => 'select',
'#title' => t('Video.js location'),
'#options' => $locations,
'#default_value' => variable_get('videojs_location', 'cdn'),
);
$form['location']['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.') . '<br/>' . t('This path can be either local (sites/all/libraries/video-js) or remote (http://yourcdn.com/video-js).'),
'#states' => array(
'visible' => array(
':input[name="videojs_location"]' => array(
'value' => 'path',
),
),
),
);
$form['location']['videojs_cdn_version'] = array(
'#type' => 'textfield',
'#title' => t('Video.js CDN version'),
'#default_value' => videojs_utility::getCdnVersion(),
'#states' => array(
'visible' => array(
':input[name="videojs_location"]' => array(
'value' => 'cdn',
),
),
),
'#size' => 10,
'#maxlength' => 20,
'#description' => t('For all available versions, take a look at the !releaseslink.', array(
'!releaseslink' => l(t('Video.js releases page'), 'https://github.com/videojs/video.js/releases'),
)),
);
$form['options'] = array(
'#type' => 'fieldset',
'#title' => t('Player defaults'),
'#collapsible' => FALSE,
'#tree' => TRUE,
);
videojs_utility::getDisplaySettingsForm($form['options']);
$form['#validate'][] = 'videojs_settings_form_validate';
$form['#submit'][] = 'videojs_settings_form_submit';
return system_settings_form($form);
}