function _flowplayer_flashvars in SWF Tools 5
Same name and namespace in other branches
- 6 flowplayer/flowplayer.module \_flowplayer_flashvars()
- 6.2 flowplayer/flowplayer.module \_flowplayer_flashvars()
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 are returned by _flowplayer_settings(). Then we prepare these values for output to html (eg. '1' become 'true') and we unset undefined flashvars to prevent their output.
1 call to _flowplayer_flashvars()
- flowplayer_swftools_flashvars in flowplayer/
flowplayer.module - Implementation of swftools_flashvars hook. Return an array of flashvars.
File
- flowplayer/
flowplayer.module, line 181
Code
function _flowplayer_flashvars($this_player) {
// Cache this.
static $flashvars = array();
if (!count($flashvars)) {
// Media Player
foreach (array(
FLOWPLAYER_MEDIAPLAYER,
) as $player) {
// Get saved settings for this method.
$defaults = _flowplayer_settings($player);
foreach ($defaults as $category => $vars) {
foreach ($vars as $key => $setting) {
if (!$setting || $setting == 'default') {
unset($defaults[$category][$key]);
}
else {
switch ($category) {
case 'color':
$defaults['color'][$key] = str_replace('#', '0x', $defaults['color'][$key]);
break;
case 'boolean':
$defaults['boolean'][$key] = _swftools_tf($defaults['boolean'][$key]);
break;
}
}
}
}
// Not the same as width/height. This determines the extended width OR height
// past the main view area where the actual playlist file names can be found.
// Setting both together is not supported.
if ($defaults['integer']['displaywidth']) {
unset($defaults['integer']['displayheight']);
}
else {
unset($defaults['integer']['displaywidth']);
}
$flashvars[$player] = $defaults;
}
}
return $flashvars[$this_player];
}