You are here

function brightcove_get_experiences_js_url in Brightcove Video Connect 7.7

Same name and namespace in other branches
  1. 7.3 brightcove.module \brightcove_get_experiences_js_url()
  2. 7.5 brightcove.module \brightcove_get_experiences_js_url()
  3. 7.6 brightcove.module \brightcove_get_experiences_js_url()

Returns the appropriate external URL to the BrightcoveExperiences.js file.

Return value

string The appropriate external js URL.

4 calls to brightcove_get_experiences_js_url()
brightcove_field_player in ./brightcove.module
Callback for brightcove_field_player - checks access to the field and prints a player for Lightbox2.
brightcove_init in ./brightcove.module
Implements hook_init().
theme_brightcove_field_formatter_default in ./brightcove_field.formatters.inc
Theme callback for Brightcove field formatter. Returns an embedded player with default site player.
theme_brightcove_field_formatter_iframe in ./brightcove_field.formatters.inc

File

./brightcove.module, line 3277
Brightcove module is an integration layer between any modules using Brightcove API. It makes all necessary checks for the API and makes settings available to the user.

Code

function brightcove_get_experiences_js_url() {
  global $is_https;

  // Set the filename we want to load.
  $filename = 'BrightcoveExperiences.js';
  if (variable_get('brightcove_player_full_api', FALSE)) {
    $filename = 'BrightcoveExperiences_all.js';
  }

  // Set the appropriate protocol.
  $path = 'http://admin.brightcove.com/js/' . $filename;
  if ($is_https) {
    $path = 'https://sadmin.brightcove.com/js/' . $filename;
  }
  return $path;
}