function genericplayers_swftools_flashvars in SWF Tools 5
Same name and namespace in other branches
- 6 genericplayers.module \genericplayers_swftools_flashvars()
- 6.2 genericplayers.module \genericplayers_swftools_flashvars()
Implementation of swftools_flashvars hook.
File
- ./
genericplayers.module, line 87
Code
function genericplayers_swftools_flashvars($action, &$methods, &$vars) {
// All we need to do is assign the 'file_url' variable to our preferred place on the flashvars array.
if ($vars->othervars['file_url']) {
$vars->flashvars['file_url'] = $vars->othervars['file_url'];
}
switch ($action) {
case SWFTOOLS_MP3_DISPLAY:
$vars->flashvars['autostart'] = isset($vars->flashvars['autostart']) ? $vars->flashvars['autostart'] : variable_get('generic_mp3_autostart', FALSE) ? 'true' : 'false';
break;
case SWFTOOLS_FLV_DISPLAY:
$vars->flashvars['autostart'] = isset($vars->flashvars['autostart']) ? $vars->flashvars['autostart'] : variable_get('generic_flv_autostart', FALSE) ? 'true' : 'false';
break;
}
return $vars->flashvars;
}