You are here

function emfield_flvmediaplayer_url in Embedded Media Field 6.3

Same name and namespace in other branches
  1. 6 emfield.module \emfield_flvmediaplayer_url()
  2. 6.2 emfield.module \emfield_flvmediaplayer_url()

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

3 calls to emfield_flvmediaplayer_url()
emfield_settings in ./emfield.admin.inc
Callback for admin/content/emfield.
emfield_settings in deprecated/emfield-deprecated.admin.inc
Callback for admin/content/emfield.
theme_emvideo_zzz_custom_url_embedded_video in contrib/emvideo/providers/zzz_custom_url.inc

File

deprecated/emfield-deprecated.inc, line 865
Functionality to be deprecated from earlier versions of Embedded Media Field.

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;
}