You are here

function video_cck_yahoomusic_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['yahoomusic']) so if you want specific provider settings within that field, you can add the elements to that form field.

File

contrib/video_cck/providers/yahoomusic.inc, line 45
This include processes Yahoo Music API media files for use by emfield.module.

Code

function video_cck_yahoomusic_settings() {
  $form['yahoomusic']['api'] = array(
    '#type' => 'fieldset',
    '#title' => t('Yahoo! Music API'),
    '#description' => t('You will first need to apply for a Yahoo App ID from the <a href="@yahoomusic" target="_blank">Yahoo! Developer Network</a>.', array(
      '@yahoomusic' => EMVIDEO_YAHOOMUSIC_API_APPLICATION_URL,
    )),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['yahoomusic']['api']['video_cck_yahoomusic_app_id'] = array(
    '#type' => 'textfield',
    '#title' => t('Yahoo! App ID'),
    '#default_value' => variable_get('video_cck_yahoomusic_app_id', ''),
    '#description' => t('Please enter your Yahoo! App ID here.'),
  );
  $form['yahoomusic']['api']['video_cck_yahoomusic_locale'] = array(
    '#type' => 'select',
    '#title' => t('Locale'),
    '#default_value' => variable_get('video_cck_yahoomusic_locale', 'us'),
    '#options' => array(
      'us' => t('United States'),
      'e1' => t('United States (Espanol)'),
      'ca' => t('Canada'),
      'mx' => t('Mexico'),
      'au' => t('Australia'),
      'nz' => t('New Zealand'),
      'uk' => t('United Kingdom'),
      'de' => t('Germany'),
      'es' => t('Spain'),
      'it' => t('Italy'),
      'fr' => t('France'),
    ),
    '#description' => t('If your application is designed for use by a web site or service in a particular country, Yahoo! Music requires that you use the locale for that country.'),
  );
  $form['yahoomusic']['player_options'] = array(
    '#type' => 'fieldset',
    '#title' => t('Embedded video player options'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['yahoomusic']['player_options']['video_cck_yahoomusic_full_screen'] = array(
    '#type' => 'checkbox',
    '#title' => t('Allow fullscreen'),
    '#default_value' => variable_get('video_cck_yahoomusic_full_screen', 1),
    '#description' => t('Allow users to view video using the entire computer screen.'),
  );
  $form['yahoomusic']['player_options']['video_cck_yahoomusic_close_enable'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable Close'),
    '#default_value' => variable_get('video_cck_yahoomusic_close_enable', 0),
    '#description' => t('Sets visibility of the close button; button action will throw a callback event of type "close".'),
  );
  $form['yahoomusic']['player_options']['video_cck_yahoomusic_controls_enable'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable Controls'),
    '#default_value' => variable_get('video_cck_yahoomusic_controls_enable', 1),
    '#description' => t('Enables the player controls.'),
  );
  $form['yahoomusic']['player_options']['video_cck_yahoomusic_info_enable'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable Info'),
    '#default_value' => variable_get('video_cck_yahoomusic_info_enable', 1),
    '#description' => t('Sets visibility of the "more info" button.'),
  );
  $form['yahoomusic']['player_options']['video_cck_yahoomusic_now_playing_enable'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable Intro'),
    '#default_value' => variable_get('video_cck_yahoomusic_now_playing_enable', 1),
    '#description' => t('Enables the intro "Now Playing: ..." component during the first few seconds of playback.'),
  );
  $form['yahoomusic']['player_options']['video_cck_yahoomusic_post_panel_enable'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable Post Panel'),
    '#default_value' => variable_get('video_cck_yahoomusic_post_panel_enable', 1),
    '#description' => t('Enables the post panel; displayed after a clip completes playback.'),
  );
  $form['yahoomusic']['player_options']['video_cck_yahoomusic_pre_panel_enable'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable Pre Panel'),
    '#default_value' => variable_get('video_cck_yahoomusic_pre_panel_enable', 1),
    '#description' => t('Enables the pre meta panel on player initialization when autoStart is disabled and a valid id has been passed into the player.'),
  );
  $form['yahoomusic']['player_options']['video_cck_yahoomusic_share_enable'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable Share'),
    '#default_value' => variable_get('video_cck_yahoomusic_share_enable', 1),
    '#description' => t('Enables the Share panel.'),
  );
  $form['yahoomusic']['player_options']['video_cck_yahoomusic_bgcolor'] = array(
    '#type' => 'textfield',
    '#title' => t('Background Color'),
    '#default_value' => variable_get('video_cck_yahoomusic_bgcolor', EMVIDEO_YAHOOMUSIC_BGCOLOR_DEFAULT),
  );
  $form['yahoomusic']['player_options']['video_cck_yahoomusic_bandwidth'] = array(
    '#type' => 'textfield',
    '#title' => t('Bandwidth'),
    '#default_value' => variable_get('video_cck_yahoomusic_bandwidth', ''),
    '#description' => t('Used to force a bandwidth; if bw is not specified the player will attempt to determine the best video bitrate quality for the user.'),
  );
  $form['yahoomusic']['player_options']['video_cck_yahoomusic_event_handler'] = array(
    '#type' => 'textfield',
    '#title' => t('Event Handler'),
    '#default_value' => variable_get('video_cck_yahoomusic_event_handler', ''),
    '#description' => t('Callback event handler that the player should make calls to.'),
  );
  return $form;
}