You are here

function flowplayer_swftools_methods in SWF Tools 5

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

Implementation of swftools_methods hook Report methods back to SWF Tools

File

flowplayer/flowplayer.module, line 20

Code

function flowplayer_swftools_methods() {

  // FlowPlayer has a few different player files, so we need to determine
  // which one is currently active
  $saved_settings = variable_get('swftools_' . FLOWPLAYER_MEDIAPLAYER, array());
  $shared_file = $saved_settings['player'] ? $saved_settings['player'] : 'flowplayer/FlowPlayerClassic.swf';
  $methods = array();
  $media_player = array(
    'name' => FLOWPLAYER_MEDIAPLAYER,
    'module' => 'flowplayer',
    'file' => 'videoFile',
    // Define which flashvar to assign a 'file to play' variable.
    'version' => '7',
    //'shared_file' => 'flowplayer/FlowPlayerClassic.swf',
    'shared_file' => $shared_file,
    'title' => t('FlowPlayer'),
    'download' => FLOWPLAYER_DOWNLOAD,
  );

  // Wijering support various actions with the same player and info.
  $methods[SWFTOOLS_FLV_DISPLAY][FLOWPLAYER_MEDIAPLAYER] = $media_player;
  $methods[SWFTOOLS_FLV_DISPLAY_LIST][FLOWPLAYER_MEDIAPLAYER] = $media_player;
  $methods[SWFTOOLS_MP3_DISPLAY][FLOWPLAYER_MEDIAPLAYER] = $media_player;
  $methods[SWFTOOLS_MP3_DISPLAY_LIST][FLOWPLAYER_MEDIAPLAYER] = $media_player;
  $methods[SWFTOOLS_MEDIA_DISPLAY][FLOWPLAYER_MEDIAPLAYER] = $media_player;
  $methods[SWFTOOLS_MEDIA_DISPLAY_LIST][FLOWPLAYER_MEDIAPLAYER] = $media_player;
  $methods[SWFTOOLS_IMAGE_DISPLAY_LIST][FLOWPLAYER_MEDIAPLAYER] = $media_player;
  return $methods;
}