function video_cck_livestream_settings in Embedded Media Field 5
hook video_cck_PROVIDER_settings this should return a subform to be added to the video_cck_settings() admin settings page. note that a form field will already be provided, at $form['PROVIDER'] (such as $form['livestream']) so if you want specific provider settings within that field, you can add the elements to that form field.
File
- contrib/
video_cck/ providers/ livestream.inc, line 56 - This include processes livestream.com media files for use by emfield.module.
Code
function video_cck_livestream_settings() {
$form['livestream']['api'] = array(
'#type' => 'fieldset',
'#title' => t('Livestream API'),
'#description' => t('You will first need to apply for an API Developer Key from the <a href="@livestream" target="_blank">Livestream Developer Profile page</a>. Note that you do not need this key to display Livestream videos or their thumbnails.', array(
'@livestream' => VIDEO_CCK_LIVESTREAM_API_APPLICATION_URL,
)),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['livestream']['api']['video_cck_livestream_api_key'] = array(
'#type' => 'textfield',
'#title' => t('Livestream API Key'),
'#default_value' => variable_get('video_cck_livestream_api_key', ''),
'#description' => t('Please enter your Livestream Developer Key here.'),
);
$form['livestream']['player_options'] = array(
'#type' => 'fieldset',
'#title' => t('Embedded video player options'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['livestream']['player_options']['video_cck_livestream_full_screen'] = array(
'#type' => 'checkbox',
'#title' => t('Allow fullscreen'),
'#default_value' => variable_get('video_cck_livestream_full_screen', 1),
'#description' => t('Allow users to view video using the entire computer screen.'),
);
$form['livestream']['player_options']['video_cck_livestream_autoplay'] = array(
'#type' => 'checkbox',
'#title' => t('Auto play'),
'#default_value' => variable_get('video_cck_livestream_autoplay', 0),
'#description' => t('Automatically play the video when users visit its page.'),
);
return $form;
}