You are here

function brightcove_field_init in Brightcove Video Connect 7.5

Same name and namespace in other branches
  1. 7.3 brightcove_field/brightcove_field.module \brightcove_field_init()
  2. 7.4 brightcove_field/brightcove_field.module \brightcove_field_init()

Implements hook_init().

File

brightcove_field/brightcove_field.module, line 31
Brightcove field module provides a Content Construction Kit module to developers, allowing them to browse videos in their Brightcove Studio and upload them.

Code

function brightcove_field_init() {
  $path = brightcove_get_experiences_js_url();
  drupal_add_js($path, array(
    'type' => 'external',
    'defer' => false,
    'async' => true,
  ));

  // Add Smart Player API related custom javascript, if it's necessary.
  if (variable_get('brightcove_player_smart_api', FALSE)) {
    drupal_add_js(drupal_get_path('module', 'brightcove_field') . '/js/events.js');
  }
}