function _flowplayer3_settings in SWF Tools 6.2
Return player configurations settings that will be used if not over-ridden.
Return value
Because there are so many settings for FlowPlayer3 the defaults are defined in the array returned by this function. The function initialises an array of defaults, merges settings from the configuration page, and returns the result.
2 calls to _flowplayer3_settings()
- flowplayer3_admin_settings in flowplayer3/
flowplayer3.admin.inc - Menu callback for the FlowPlayer3 settings form.
- flowplayer3_swftools_flashvars in flowplayer3/
flowplayer3.module - Implementation of swftools_flashvars hook(). Note that $methods and $vars are passed by reference, so the player module can manipulate them directly if necessary.
File
- flowplayer3/
flowplayer3.module, line 296
Code
function _flowplayer3_settings() {
// Define the settings list
$defaults['clip'] = array(
'autoPlay' => 'false',
'autoBuffering' => 'false',
'scaling' => 'scale',
'start' => '',
'duration' => '',
'accelerated' => 'false',
'bufferLength' => '',
'provider' => '',
'fadeInSpeed' => '',
'fadeOutSpeed' => '',
'linkUrl' => '',
'linkWindow' => '_blank',
'live' => 'false',
'cuePointMultiplier' => '',
);
$defaults['controls'] = array(
'backgroundColor' => '#000000',
'timeColor' => '#01DAFF',
'durationColor' => '#FFFFFF',
'progressColor' => '#015B7A',
'backgroundGradient' => 'medium',
'progressGradient' => 'medium',
'bufferColor' => '#6C9CBC',
'bufferGradient' => 'none',
'sliderColor' => '#000000',
'sliderGradient' => 'none',
'buttonColor' => '#889AA4',
'buttonOverColor' => '#92B2BD',
'autoHide' => 'fullscreen',
'play' => 'true',
'volume' => 'true',
'mute' => 'true',
'time' => 'true',
'stop' => 'false',
'playlist' => 'false',
'fullscreen' => 'true',
'scrubber' => 'true',
'top' => '',
'left' => '',
'bottom' => '',
'right' => '',
'opacity' => '',
);
$defaults['canvas'] = array(
'width' => 500,
'height' => 375,
'backgroundColor' => '#000000',
'backgroundImage' => '',
'backgroundRepeat' => 'repeat',
'backgroundGradient' => 'low',
'border' => '',
'borderRadius' => '',
);
// Retrieve settings from database, if available
$saved_settings = variable_get(FLOWPLAYER3_MEDIAPLAYER, array());
$saved_colors = variable_get('flowplayer3_palette', array());
if ($saved_colors) {
// Move background color to canvas
$saved_settings['canvas']['backgroundColor'] = $saved_colors['backgroundColor'];
// Move control bar background color to controls
$saved_colors['backgroundColor'] = $saved_colors['controlbarbackgroundColor'];
unset($saved_colors['controlbarbackgroundColor']);
$saved_settings['controls'] += $saved_colors;
}
// Merge the two sets together
$defaults = array_merge($defaults, $saved_settings);
// Return resulting defaults
return $defaults;
}