You are here

function _flowplayer_settings in SWF Tools 6.2

Same name and namespace in other branches
  1. 5 flowplayer/flowplayer.module \_flowplayer_settings()
  2. 6 flowplayer/flowplayer.module \_flowplayer_settings()

These are the default settings as they are stored in the database and displayed on the settings page.

2 calls to _flowplayer_settings()
flowplayer_admin_form in flowplayer/flowplayer.admin.inc
_flowplayer_flashvars in flowplayer/flowplayer.module
This function is called from flowplayer_swftools_flashvars() which is called from swf() It will return the default flashvar configuration, just prior to any overrides passed into swf(). We start with the settings defined on admin/swf/wijering which…

File

flowplayer/flowplayer.module, line 279

Code

function _flowplayer_settings($player) {
  switch ($player) {
    case FLOWPLAYER_MEDIAPLAYER:

      // Define the settings list.
      $defaults['boolean'] = array(
        'autoPlay' => 'default',
        'usePlayOverlay' => 'default',
        'hideControls' => 'default',
        'loop' => 'default',
        'showFullScreenButton' => 'default',
        'showPlayListButtons' => 'default',
        'fullscreen' => 'default',
      );
      $defaults['color'] = array();
      $defaults['url'] = array();
      $defaults['integer'] = array(
        'initialVolumePercentage' => '',
      );
      $defaults['other'] = array(
        'player' => 'default',
        'controlBarGloss' => 'default',
      );
      $saved_settings = variable_get('swftools_' . FLOWPLAYER_MEDIAPLAYER, array());
      break;
  }

  // Overwrite initialised variables with those that might be already saved.
  foreach ($defaults as $category => $vars) {
    foreach ($vars as $key => $setting) {
      if (isset($saved_settings[$key])) {
        $defaults[$category][$key] = $saved_settings[$key];
      }
    }
  }
  return $defaults;
}