You are here

function swftools_get_player in SWF Tools 5

Same name and namespace in other branches
  1. 6.3 swftools.module \swftools_get_player()
  2. 6 swftools.module \swftools_get_player()
  3. 6.2 swftools.module \swftools_get_player()

Identify the best flash player based on the chosen action. In a couple of cases we have a built-in default, but FALSE indicates that no default player is configured.

2 calls to swftools_get_player()
swf in ./swftools.module
Return output, which might be embed markup, or pre-flash markup that includes the appropriate jQuery added to the <head>
_swftools_admin_file_handling_option in ./swftools.admin.inc

File

./swftools.module, line 579

Code

function swftools_get_player($action, $part = FALSE) {
  $methods = swftools_methods_available($action);
  switch ($action) {
    case SWFTOOLS_FLV_DISPLAY:
      return variable_get(SWFTOOLS_FLV_DISPLAY, GENERIC_FLV);
    case SWFTOOLS_MP3_DISPLAY:
      return variable_get(SWFTOOLS_MP3_DISPLAY, GENERIC_MP3);
    case SWFTOOLS_SWF_DISPLAY_DIRECT:
      return variable_get(SWFTOOLS_SWF_DISPLAY_DIRECT, SWFTOOLS_SWF);
    default:
      return variable_get($action, FALSE);
  }
}