You are here

public function video_zencoder_api::__construct in Video 6.5

Same name and namespace in other branches
  1. 6.4 plugins/video_zencoder/video_zencoder.lib.inc \video_zencoder_api::__construct()
  2. 7 modules/video_zencoder/includes/zencoder.inc \video_zencoder_api::__construct()

File

plugins/video_zencoder/video_zencoder.lib.inc, line 20
Class file to handle amazon s3 transfers.

Class

video_zencoder_api

Code

public function __construct() {

  // Create the Zencoder class
  $libpath = libraries_get_path('zencoder');
  $libfile = $libpath . '/Services/Zencoder.php';
  if (!file_exists($libfile)) {
    drupal_set_message(t('The Zencoder library has not been installed correctly. See the <a href="@drupal-status-page">Drupal status page</a> for more information.', array(
      '@drupal-status-page' => url('admin/reports/status'),
    )), 'error');
    return;
  }
  $this->access_key = variable_get('video_zencoder_api_key', NULL);
  require_once $libfile;
  $this->zencoder = new Services_Zencoder($this->access_key);
}