You are here

function imageeditor_webcams_webcam in Image Editor 7

Page callback for jQuery webcam.

1 string reference to 'imageeditor_webcams_webcam'
imageeditor_webcams_menu in imageeditor_webcams/imageeditor_webcams.module
Implements hook_menu().

File

imageeditor_webcams/imageeditor_webcams.pages.inc, line 47
Different pages for Image Editor Webcams module.

Code

function imageeditor_webcams_webcam() {
  drupal_add_js('sites/all/libraries/jquery-webcam/jquery.webcam.js');
  drupal_add_js(drupal_get_path('module', 'imageeditor_webcams') . '/js/imageeditor.webcam.js');
  drupal_add_js(array(
    'imageeditor' => array(
      'webcam' => array(
        'swffile' => '/sites/all/libraries/jquery-webcam/jscam.swf',
      ),
    ),
  ), 'setting');
  $output = '<div id="imageeditor_webcam_status"></div>';
  $output .= '<div id="imageeditor_webcam"></div>';
  $output .= '<div id="imageeditor_webcam_cams"></div>';
  $output .= theme('item_list', array(
    'title' => 'Available options',
    'items' => array(
      array(
        'data' => t('Take a picture instantly'),
        'id' => 'imageeditor_webcam_capture',
      ),
      array(
        'data' => t('Take a picture after 5 seconds'),
        'id' => 'imageeditor_webcam_capture5',
      ),
    ),
  ));
  return $output;
}