You are here

function _brightcove_initialize in Brightcove Video Connect 6

Same name and namespace in other branches
  1. 6.2 brightcove.module \_brightcove_initialize()

Include all BC MAPI SDK files.

9 calls to _brightcove_initialize()
brightcove_cck_autocomplete in brightcove_cck/brightcove_cck.browse.inc
Menu callback for brightcove_cck/autocomplete.
brightcove_cck_browse in brightcove_cck/brightcove_cck.browse.inc
This function is a callback for modalframe window, providing an access to browse videos.
brightcove_cck_browser_validate in brightcove_cck/brightcove_cck.module
Validate callback for the field.
brightcove_cck_handler_field_video_tags::render in brightcove_cck/views/brightcove_cck_handler_field_video_tags.inc
brightcove_cck_handler_field_video_tags_multiple::render in brightcove_cck/views/brightcove_cck_handler_field_video_tags_multiple.inc

... See full list

File

./brightcove.module, line 102
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_initialize() {
  $read_token = variable_get('brightcove_read_api_key', '');
  $write_token = variable_get('brightcove_write_api_key', '');
  if (empty($read_token)) {
    drupal_set_message(t('Cannot initialize Brightcove API. Contact site administrators.'));
    watchdog('brightcove', 'Brightcove Read API keys not found, cannot initialize Brightcove MAPI SDK.', array(), WATCHDOG_ERROR);
    return FALSE;
  }
  $bc = new BCMAPI($read_token, $write_token);
  return $bc;
}