You are here

function emfield_flvmediaplayer_url in Embedded Media Field 6.2

Same name and namespace in other branches
  1. 6.3 deprecated/emfield-deprecated.inc \emfield_flvmediaplayer_url()
  2. 6 emfield.module \emfield_flvmediaplayer_url()

Returns the URL to the registered JW Flash Media Player, if such exists.

1 call to emfield_flvmediaplayer_url()
emfield_settings in ./emfield.admin.inc
Callback for admin/content/emfield.

File

./emfield.module, line 806
Embedded Media Field is a CCK-based framework for 3rd party media files.

Code

function emfield_flvmediaplayer_url($reset = FALSE) {
  static $path;
  if (!isset($path) || $reset) {
    if (module_exists('flvmediaplayer')) {
      $path = variable_get('flvmediaplayer_path', drupal_get_path('module', 'flvmediaplayer') . '/mediaplayer.swf');
    }
    else {
      if ($reset || ($path = variable_get('emfield_flvmediaplayer_url', NULL) && !$path)) {
        $path = _emfield_autodiscover_path('(^player-viral\\.swf$|^player\\.swf$|^mediaplayer\\.swf$)');
        variable_set('emfield_flvmediaplayer_url', $path);
      }
    }
  }
  return $path;
}