You are here

function hook_swftools_methods in SWF Tools 6.3

Reports an embedding method or a player to SWF Tools.

Embedding methods and players should implement hook_swftools_methods() to register themselves with SWF Tools.

Related topics

15 functions implement hook_swftools_methods()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

swftools_flexpaper_swftools_methods in flexpaper/swftools_flexpaper.module
Implementation of hook_swftools_methods().
swftools_flowplayer3_swftools_methods in flowplayer3/swftools_flowplayer3.module
Implementation of hook_swftools_methods().
swftools_flowplayer_swftools_methods in flowplayer/swftools_flowplayer.module
Implementation of hook_swftools_methods().
swftools_genericplayers_swftools_methods in includes/swftools.genericplayers.inc
Implementation of hook_swftools_methods().
swftools_imagerotator_swftools_methods in imagerotator/swftools_imagerotator.module
Implementation of hook_swftools_methods().

... See full list

1 invocation of hook_swftools_methods()
swftools_get_methods in includes/swftools.core.inc
Collects information from all modules about the players and embedding methods available.

File

docs/swftools.php, line 76
Doxygen documentation for SWF Tools.

Code

function hook_swftools_methods() {

  /**
   * First define the player as an array of properties.
   */
  $myplayer = array(
    'module' => 'swftools_myplayer',
    'version' => 9,
    'title' => t('My Player'),
    'download' => 'http://myplayer.org',
    'width' => 500,
    'height' => 375,
    'library' => swftools_get_library('myplayer') . 'myplayer/myplayer.swf',
    'profile' => array(
      'path' => 'myplayer',
      'settings' => array(
        'swftools_myplayer',
        'swftools_myplayer_colors',
      ),
      'file' => 'swftools_myplayer.admin.inc',
      'page argument' => 'swftools_myplayer_form',
    ),
  );

  /**
   * Then associate the player with actions that it can process.
   * [action][name_of_player] = [player_details]
   */
  $methods['video']['myplayer'] = $myplayer;
  $methods['video_list']['myplayer'] = $myplayer;
  $methods['audio']['myplayer'] = $myplayer;
  $methods['audio_list']['myplayer'] = $myplayer;
  $methods['image_list']['myplayer'] = $myplayer;
  $methods['swftools_media_display']['myplayer'] = $myplayer;
  $methods['media_list']['myplayer'] = $myplayer;

  // Return the method results
  return $methods;
}