You are here

video_embed_field.module in Video Embed Field 7

File

video_embed_field.module
View source
<?php

/**
 *  Provides a simple field for easily embedding videos from youtube or vimeo
 *
 *  This module is not intended to replace media or video - it does not allow for any local storage of videos, custom players or anything else
 *  It simply allows users to embed videos from youtube and vimeo - and provides a hook to allow other modules to provide more providers.
 *
 *  @author jcaldwell aka jec006
 */

/**
 *  Implementation of hook_field_info
 *  Define the fields we're creating
 */
function video_embed_field_field_info() {
  return array(
    'video_embed_field' => array(
      'label' => 'Video Embed',
      'description' => 'Embed videos from youtube or vimeo',
      'settings' => array(),
      'instance_settings' => array(
        'allowed_types' => array(
          'youtube',
          'vimeo',
        ),
        'description_field' => 0,
      ),
      'default_widget' => 'video_embed_field_widget',
      'default_formatter' => 'video_embed_field_formatter',
    ),
  );
}

/**
 * Implements hook_field_instance_settings_form().
 */
function video_embed_field_field_instance_settings_form($field, $instance) {
  $settings = $instance['settings'];
  $form['description_field'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable <em>Description</em> field'),
    '#default_value' => isset($settings['description_field']) ? $settings['description_field'] : '',
    '#description' => t('The description field allows users to enter a description about the video.'),
    '#parents' => array(
      'instance',
      'settings',
      'description_field',
    ),
    '#weight' => 11,
  );

  //Grab the settings off the parser form
  $parser_form = isset($instance['settings']['playback_settings']) ? video_embed_field_get_form($instance['settings']['playback_settings']) : video_embed_field_get_form(array());

  //General settings for playback - formerly in the configuration section
  $form['playback_settings'] = array(
    '#type' => 'vertical_tabs',
    '#title' => t('Playback settings'),
    '#weight' => 15,
  ) + $parser_form;

  //add in our extra settings
  return $form;
}

/**
 *  Implementation of hook_field_widget_info
 *  Define the widget for inputting 
 */
function video_embed_field_field_widget_info() {
  return array(
    'video_embed_field_widget' => array(
      'label' => 'Video Embed',
      'description' => 'Provides a video embed field',
      'field types' => array(
        'video_embed_field',
      ),
      'settings' => array(),
      'behaviors' => array(
        'multiple values' => FIELD_BEHAVIOR_DEFAULT,
        'default value' => FIELD_BEHAVIOR_DEFAULT,
      ),
    ),
  );
}

/**
 *  implementation of hook_field_widget_form
 */
function video_embed_field_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {

  //don't need to check the type right now because we're only defining one
  $element += array(
    '#type' => 'video_embed_field_widget',
  );
  $element['video_url'] = array(
    '#type' => 'textfield',
    '#title' => $element['#title'],
    '#description' => $element['#description'],
    '#attributes' => array(
      'class' => array(
        'video_embed_url',
      ),
    ),
    '#attached' => array(
      'css' => array(
        drupal_get_path('module', 'video_embed_field') . '/video_embed_field.form.css',
      ),
    ),
    '#default_value' => isset($items[$delta]['video_url']) ? $items[$delta]['video_url'] : '',
    '#required' => $element['#required'],
  );

  // Add the description field if enabled.
  if (!empty($instance['settings']['description_field'])) {
    $element['description'] = array(
      '#type' => 'textfield',
      '#title' => t('Description'),
      '#default_value' => isset($items[$delta]['description']) ? $items[$delta]['description'] : '',
      '#description' => t('The description which may be used as a label.'),
    );
  }
  return $element;
}
function video_embed_field_field_validate($entity_type, $entity, $field, $instance, $langcode, $items, &$errors) {
  foreach ($items as $delta => $item) {
    if (!empty($item['video_url'])) {
      $item['video_url'] = trim($item['video_url']);
      if (stristr($item['video_url'], '.') && !stristr($item['video_url'], 'http://') && !stristr($item['video_url'], 'https://')) {
        $item['video_url'] = 'http://' . $item['video_url'];
      }
      $parts = parse_url($item['video_url']);
      if (!$parts || !isset($parts['host'])) {
        $errors[$field['field_name']][$langcode][$delta][] = array(
          'error' => t('Invalid Url'),
          'message' => t('Video: Invalid Video URL.', array(
            '%name' => $instance['label'],
          )),
        );
      }
      else {
        $host = $parts['host'];
        if (stripos($host, 'www.') > -1) {
          $host = substr($host, 4);
        }
        $handlers = video_embed_get_handlers();
        if (!isset($handlers[$host]['function']) || !function_exists($handlers[$host]['function'])) {
          $errors[$field['field_name']][$langcode][$delta][] = array(
            'error' => t('Unsupported Video Provider'),
            'message' => t('%name: This video provider is not currently supported.', array(
              '%name' => $instance['label'],
            )),
          );
        }
      }
    }
  }
}

/**
 *  Implementation of hook_field_is_empty
 *  Determine whether the field is empty
 */
function video_embed_field_field_is_empty($item, $field) {
  return empty($item) || empty($item['video_url']) || $item['video_url'] === '';
}
function video_embed_field_field_formatter_info() {
  return array(
    'video_embed_field_formatter' => array(
      'label' => t('Video Embed Formatter'),
      'field types' => array(
        'video_embed_field',
      ),
    ),
    'video_embed_field_formatter_teaser' => array(
      'label' => t('Video Embed Formatter - Teaser'),
      'field types' => array(
        'video_embed_field',
      ),
    ),
    'video_embed_field_formatter_image_large' => array(
      'label' => t('Video Embed Formatter - Image - Large'),
      'field types' => array(
        'video_embed_field',
      ),
    ),
    'video_embed_field_formatter_image_medium' => array(
      'label' => t('Video Embed Formatter - Image - Medium'),
      'field types' => array(
        'video_embed_field',
      ),
    ),
    'video_embed_field_formatter_image_small' => array(
      'label' => t('Video Embed Formatter - Image - Small'),
      'field types' => array(
        'video_embed_field',
      ),
    ),
  );
}

/**
*  Implementation of hook_field_formatter_prepare_view
*  Prepare the view of the video embed - if the embed code doesn't exist, create it using the url
*/
function video_embed_field_field_formatter_prepare_view($entity_type, $entities, $field, $instances, $langcode, &$items, $displays) {
  $handlers = video_embed_get_handlers();
  foreach ($items as $delta => $item_wrapper) {
    foreach ($item_wrapper as $key => $item) {
      if (!stristr($item['video_url'], 'http://') && !stristr($item['video_url'], 'https://')) {
        $item['video_url'] = 'http://' . $item['video_url'];
      }
      $parts = parse_url($item['video_url']);

      //make sure bad data won't mess everything up
      if (!isset($parts['host'])) {
        $items[$delta][$key]['embed_code'] = l($item['video_url'], $item['video_url']);
        return;
      }
      $host = $parts['host'];
      if (stripos($host, 'www.') > -1) {
        $host = substr($host, 4);
      }

      //make our host all lowercase so that it'll properly match the index
      $host = strtolower($host);
      if (isset($handlers[$host]['function']) && function_exists($handlers[$host]['function'])) {

        //get what type of display it is
        $display = $displays[$delta]['type'];
        if (isset($instances[$delta]['settings']['playback_settings'])) {
          $settings = $instances[$delta]['settings']['playback_settings'][$handlers[$host]['title']];
          $settings = array_merge($handlers[$host]['defaults'], $settings);
        }
        else {
          $settings = $handlers[$host]['defaults'];
        }
        if ($display == 'video_embed_field_formatter_teaser') {
          $items[$delta][$key]['embed_code'] = call_user_func($handlers[$host]['function'], $item['video_url'], $settings, 'teaser');
        }
        else {
          if ($display == 'video_embed_field_formatter_image_small') {
            $items[$delta][$key]['embed_code'] = call_user_func($handlers[$host]['function'], $item['video_url'], $settings, 'image', 'small');
          }
          else {
            if ($display == 'video_embed_field_formatter_image_medium') {
              $items[$delta][$key]['embed_code'] = call_user_func($handlers[$host]['function'], $item['video_url'], $settings, 'image', 'medium');
            }
            else {
              if ($display == 'video_embed_field_formatter_image_large') {
                $items[$delta][$key]['embed_code'] = call_user_func($handlers[$host]['function'], $item['video_url'], $settings, 'image', 'large');
              }
              else {
                $items[$delta][$key]['embed_code'] = call_user_func($handlers[$host]['function'], $item['video_url'], $settings);
              }
            }
          }
        }
      }
      else {
        $items[$delta][$key]['embed_code'] = l($item['video_url'], $item['video_url']);
      }
    }
  }
}

/**
*  implementation of hook_field_widget_form
*/
function video_embed_field_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
  $element = array();
  foreach ($items as $delta => $item) {
    if (isset($item['description']) && $item['description']) {
      $description = array(
        '#prefix' => '<div class="video-embed-description">',
        '#markup' => $item['description'],
        '#suffix' => '</div>',
      );
    }
    else {
      $description = array();
    }
    $element[$delta] = array(
      array(
        '#markup' => $item['embed_code'],
      ),
      $description,
    );
  }
  return $element;
}

/**
 *  Creates a hook that other modules can implement to get handlers - hook_video_embed_handler_info
 *  Can be used to add more handlers if needed - from other modules and such
 *  @see video_embed_field.api.php for more information
 */
function video_embed_get_handlers() {
  $handlers = cache_get('video_embed_field_handlers');
  if ($handlers === FALSE) {
    $available = module_invoke_all('video_embed_handler_info');
    foreach ($available as $handler) {
      $handlers[$handler['domain']] = $handler;
    }
    drupal_alter('video_embed_field_handlers', $handlers);
    cache_set('video_embed_field_handlers', $handlers);
  }
  else {
    $handlers = $handlers->data;
  }
  return $handlers;
}

/**
 *  Adds a formatter for inserting directly into content
 */

/**
 * Implements hook_filter_info().
 */
function video_embed_field_filter_info() {
  $filters['video_embed_field'] = array(
    'title' => t('Video Embedding'),
    'description' => t('Replaces [VIDEO::http://www.youtube.com/watch?v=someVideoID] tags with embedded videos.'),
    'process callback' => 'video_embed_field_filter_process',
  );
  return $filters;
}

/**
 * Video Embed Field filter process callback
 */
function video_embed_field_filter_process($text, $filter, $format) {
  preg_match_all('/ \\[VIDEO:: ( [^\\[\\]]+ )* \\] /x', $text, $matches);
  $tag_match = (array) array_unique($matches[1]);
  $handlers = video_embed_get_handlers();
  foreach ($tag_match as $video_url) {

    // Add http if needed
    if (!stristr($video_url, 'http://') && !stristr($video_url, 'https://')) {
      $video_url = 'http://' . $video_url;
    }
    $parts = parse_url($video_url);

    // Make sure bad data won't mess everything up
    if (!isset($parts['host'])) {
      $embed_code = l($video_url, $video_url);
    }
    else {
      $host = $parts['host'];
      if (stripos($host, 'www.') > -1) {
        $host = substr($host, 4);
      }
      if (isset($handlers[$host]['function']) && function_exists($handlers[$host]['function'])) {
        $defaults = $handlers[$host]['defaults'];

        //TODO We need a way for people to configure how an embed works
        $embed_code = call_user_func($handlers[$host]['function'], $video_url, $defaults);
      }
      else {
        $embed_code = l($video_url, $video_url);
      }
    }
    $text = str_replace('[VIDEO::' . $video_url . ']', $embed_code, $text);
  }
  return $text;
}

/**
 *  Implementation of hook_video_embed_handler_info
 */
function video_embed_field_video_embed_handler_info() {
  $ytdefaults = array(
    'height' => 349,
    'width' => 560,
    'teaser_height' => 349,
    'teaser_width' => 560,
    'autoplay' => 0,
    'hd' => 1,
    'rel' => 0,
    'autohide' => 2,
    'showinfo' => 1,
    'theme' => 'dark',
  );
  return array(
    'youtube' => array(
      'domain' => 'youtube.com',
      'function' => 'video_embed_field_handle_youtube',
      'defaults' => $ytdefaults,
      'form' => 'video_embed_field_handler_youtube_form',
      'title' => 'Youtube',
    ),
    //include short form of youtube for sanity of users
    'youtu.be' => array(
      'domain' => 'youtu.be',
      'defaults' => $ytdefaults,
      'function' => 'video_embed_field_handle_youtube',
      'title' => 'Youtube',
    ),
    'vimeo' => array(
      'domain' => 'vimeo.com',
      'function' => 'video_embed_field_handle_vimeo',
      'defaults' => array(
        'height' => 315,
        'width' => 560,
        'teaser_height' => 315,
        'teaser_width' => 560,
        'color' => '00adef',
        'autoplay' => 0,
      ),
      'form' => 'video_embed_field_handler_vimeo_form',
      'title' => 'Vimeo',
    ),
  );
}

/**
 *  Create a form from the player configuration options
 *  $defaults will be passed in with the default settings for the various fields
 */
function video_embed_field_get_form($defaults) {
  $handlers = video_embed_get_handlers();
  $form = array();
  foreach ($handlers as $domain => $handler) {
    if (isset($handler['form']) && function_exists($handler['form'])) {
      $handler_defaults = isset($defaults[$handler['title']]) ? $defaults[$handler['title']] : array();
      $handler_defaults = array_merge($handler['defaults'], $handler_defaults);
      $form[$handler['title']] = call_user_func($handler['form'], $handler_defaults);
      $form[$handler['title']] += array(
        '#type' => 'fieldset',
        '#title' => t($handler['title']),
      );
    }
  }
  return $form;
}

/**
 *  handler for youtube videos
 */
function video_embed_field_handle_youtube($url, $settings, $type = 'video', $image_size = 'small') {

  //figure out the id of the video they want to play from the url

  //strip off the http
  if (stristr($url, 'http://')) {
    $url = substr($url, 7);
  }
  else {
    if (stristr($url, 'https://')) {
      $url = substr($url, 8);
    }
  }
  $pos = strripos($url, 'v=');
  if ($pos !== FALSE) {
    $pos += 2;
    $pos2 = stripos($url, '&', $pos);
  }
  else {
    $pos = strripos($url, '/');
    if ($pos !== FALSE) {
      $pos++;
      $pos2 = stripos($url, '?', $pos);
    }
  }
  if ($pos === FALSE) {

    //we can't figure out the url - just return the url as a link
    return l($url, $url);
  }
  else {
    if ($pos2 > 0) {
      $id = substr($url, $pos, $pos2 - $pos);
    }
    else {
      $id = substr($url, $pos);
    }
  }
  if ($type == 'image') {
    if ($image_size == 'large') {
      return '<img src="' . 'http://img.youtube.com/vi/' . $id . '/0.jpg' . '" />';

      // large
    }
    else {

      // small and medium have same size for youtube
      return '<img src="' . 'http://img.youtube.com/vi/' . $id . '/2.jpg' . '" />';

      // small
    }
  }
  else {

    //get settings
    $teaser = $type == 'teaser';
    $height = $teaser ? $settings['teaser_height'] : $settings['height'];
    $width = $teaser ? $settings['teaser_width'] : $settings['width'];
    $hd = $settings['hd'];
    $rel = $settings['rel'];
    $autoplay = $settings['autoplay'];
    $autohide = $settings['autohide'];
    $showinfo = $settings['showinfo'];
    $theme = $settings['theme'];
    $template_start = '<iframe width="' . $width . '" height="' . $height . '" src="';
    $template_end = '?hd=' . $hd . '&amp;rel=' . $rel . '&amp;wmode=opaque&amp;autoplay=' . $autoplay . '&amp;theme=' . $theme . '&amp;autohide=' . $autohide . '&amp;showinfo=' . $showinfo . '" frameborder="0" allowfullscreen></iframe>';
    $url_temp = 'http://www.youtube.com/embed/';
    return $template_start . $url_temp . $id . $template_end;
  }
}

/**
 *  Defines the form elements for the youtube configuration form
 *  Eventually it might be nice to have these forms be available per instance instead of just global config
 */
function video_embed_field_handler_youtube_form($defaults) {
  $form = array();
  $form['height'] = array(
    '#type' => 'textfield',
    '#size' => '5',
    '#title' => t('Player Height'),
    '#description' => t('The height of the youtube player, in pixels.  Only enter the number e.g. 349'),
    '#default_value' => $defaults['height'],
  );
  $form['width'] = array(
    '#type' => 'textfield',
    '#size' => '5',
    '#title' => t('Player Width'),
    '#description' => t('The width of the youtube player, in pixels.  Only enter the number e.g. 560'),
    '#default_value' => $defaults['width'],
  );
  $form['teaser_height'] = array(
    '#type' => 'textfield',
    '#size' => '5',
    '#title' => t('Player Height - Teaser'),
    '#description' => t('The height of the youtube player, in pixels.  Only enter the number e.g. 349'),
    '#default_value' => $defaults['teaser_height'],
  );
  $form['teaser_width'] = array(
    '#type' => 'textfield',
    '#size' => '5',
    '#title' => t('Player Width - Teaser'),
    '#description' => t('The width of the youtube player, in pixels.  Only enter the number e.g. 560'),
    '#default_value' => $defaults['teaser_width'],
  );
  $form['theme'] = array(
    '#type' => 'select',
    '#options' => array(
      'dark' => t('Dark'),
      'light' => t('Light'),
    ),
    '#title' => t('Player theme'),
    '#default_value' => $defaults['theme'],
  );
  $form['autoplay'] = array(
    '#type' => 'checkbox',
    '#title' => t('Autoplay'),
    '#description' => t('Play the video immediately.'),
    '#default_value' => $defaults['autoplay'],
  );
  $form['hd'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use HD'),
    '#description' => t('Attempt to play the video in HD if available.'),
    '#default_value' => $defaults['hd'],
  );
  $form['rel'] = array(
    '#type' => 'checkbox',
    '#title' => t('Show related videos'),
    '#description' => t('Show related videos after the video is finished playing.'),
    '#default_value' => $defaults['rel'],
  );
  $form['showinfo'] = array(
    '#type' => 'checkbox',
    '#title' => t('Show info'),
    '#description' => t('Display information like the video title and rating before the video starts playing.'),
    '#default_value' => $defaults['showinfo'],
  );
  $form['autohide'] = array(
    '#type' => 'radios',
    '#options' => array(
      0 => t('The video progress bar and player controls will be visible throughout the video.'),
      1 => t('Automatically slide the video progress bar and the player controls out of view a couple of seconds after the video starts playing. They will only reappear if the user moves her mouse over the video player or presses a keyboard key.'),
      2 => t('The video progress bar will fade out but the player controls (play button, volume control, etc.) remain visible.'),
    ),
    '#title' => t('Autohide progress bar and the player controls'),
    '#description' => t('Controls the autohide behavior of the youtube player controls.'),
    '#default_value' => $defaults['autohide'],
  );
  return $form;
}

/**
 *  handler for vimeo videos
 *  Height and width need to be configurable or something I think
 */
function video_embed_field_handle_vimeo($url, $settings, $type = 'video', $image_size = 'small') {
  $pos = strripos($url, '/');
  if ($pos === FALSE) {

    //we can't figure out the url - just return the url as a link
    return l($url, $url);
  }
  else {
    $pos += 1;
    $id = substr($url, $pos);
  }
  if ($type == 'image') {
    $return = file_get_contents('http://vimeo.com/api/v2/video/' . $id . '.php');
    $return = unserialize($return);
    $video = current($return);

    // contains also thumbnail_medium, may want to check it
    if ($image_size == 'large') {
      $image_url = $video['thumbnail_large'];
    }
    else {
      if ($image_size == 'medium') {
        $image_url = $video['thumbnail_medium'];
      }
      else {
        $image_url = $video['thumbnail_small'];
      }
    }
    return '<img src="' . $image_url . '" />';
  }
  else {

    //get configuration options
    $teaser = $type == 'teaser';
    $height = $teaser ? $settings['teaser_height'] : $settings['height'];
    $width = $teaser ? $settings['teaser_width'] : $settings['width'];
    $color = $settings['color'];
    $autoplay = $settings['autoplay'];
    $template_start = '<iframe src="http://player.vimeo.com/video/';
    $template_end = '?portrait=0&amp;color=' . $color . '&amp;autoplay=' . $autoplay . '" frameborder="0" height="' . $height . '" width="' . $width . '"></iframe>';
    return $template_start . $id . $template_end;
  }
}

/**
 *  Defines the form elements for the vimeo configuration form
 */
function video_embed_field_handler_vimeo_form($defaults) {

  //use base defaults to ensure that each setting has some default value - $defaults, the user entered values will override
  $base_defaults = array(
    'height' => 315,
    'width' => 560,
    'teaser_height' => 315,
    'teaser_width' => 560,
    'color' => '00adef',
    'autoplay' => 0,
  );
  $defaults = array_merge($base_defaults, $defaults);
  $form = array();
  $form['height'] = array(
    '#type' => 'textfield',
    '#size' => '5',
    '#title' => t('Player Height'),
    '#description' => t('The height of the vimeo player, in pixels.  Only enter the number e.g. 315'),
    '#default_value' => $defaults['height'],
  );
  $form['width'] = array(
    '#type' => 'textfield',
    '#size' => '5',
    '#title' => t('Player Width'),
    '#description' => t('The width of the vimeo player, in pixels.  Only enter the number e.g. 560'),
    '#default_value' => $defaults['width'],
  );
  $form['teaser_height'] = array(
    '#type' => 'textfield',
    '#size' => '5',
    '#title' => t('Player Height - Teaser'),
    '#description' => t('The height of the vimeo player, in pixels.  Only enter the number e.g. 315'),
    '#default_value' => $defaults['teaser_height'],
  );
  $form['teaser_width'] = array(
    '#type' => 'textfield',
    '#size' => '5',
    '#title' => t('Player Width - Teaser'),
    '#description' => t('The width of the vimeo player, in pixels.  Only enter the number e.g. 560'),
    '#default_value' => $defaults['teaser_width'],
  );
  $form['color'] = array(
    '#type' => 'select',
    '#options' => array(
      '00adef' => t('Blue'),
      'ff9933' => t('Orange'),
      'c9ff23' => t('Lime'),
      'ff0179' => t('Fuschia'),
      'ffffff' => t('White'),
    ),
    '#title' => t('Player Color'),
    '#description' => t('The color to use on the vimeo player.'),
    '#default_value' => $defaults['color'],
  );
  $form['autoplay'] = array(
    '#type' => 'checkbox',
    '#title' => t('Autoplay'),
    '#description' => t('Play the video immediately.'),
    '#default_value' => $defaults['autoplay'],
  );
  return $form;
}

/**
 *  Implementation of hook_requirements
 *  Warn users if they are using the default settings because they haven't updated their fields
 */
function video_embed_field_requirements($phase) {
  if ($phase == 'runtime') {
    $fields = array_filter(field_info_fields(), '_video_embed_field_array_filter');
    $errors = array();
    foreach ($fields as $field_name => $field) {
      $instances = field_read_instances(array(
        'field_name' => $field_name,
      ));
      foreach ($instances as $key => $instance) {
        if (!isset($instance['settings']['playback_settings'])) {
          $errors[] = $instance['field_name'] . ' on ' . $instance['entity_type'] . ' type ' . $instance['bundle'];
        }
      }
    }
    if (!empty($errors)) {
      $requirements = array(
        'video_embed_field' => array(
          'description' => t('Some video_embed_fields are using the old settings format.  You will need to go set the preferences for each field manually. '),
          'severity' => REQUIREMENT_ERROR,
          'title' => t('Video Embed Field settings:'),
          'value' => implode(', ', $errors),
        ),
      );
      return $requirements;
    }
  }
}

//used to array filter in video_embed_field_requirements
function _video_embed_field_array_filter($item) {
  return isset($item['type']) && $item['type'] == 'video_embed_field' && !$item['deleted'];
}

Functions

Namesort descending Description
video_embed_field_field_formatter_info
video_embed_field_field_formatter_prepare_view Implementation of hook_field_formatter_prepare_view Prepare the view of the video embed - if the embed code doesn't exist, create it using the url
video_embed_field_field_formatter_view implementation of hook_field_widget_form
video_embed_field_field_info Implementation of hook_field_info Define the fields we're creating
video_embed_field_field_instance_settings_form Implements hook_field_instance_settings_form().
video_embed_field_field_is_empty Implementation of hook_field_is_empty Determine whether the field is empty
video_embed_field_field_validate
video_embed_field_field_widget_form implementation of hook_field_widget_form
video_embed_field_field_widget_info Implementation of hook_field_widget_info Define the widget for inputting
video_embed_field_filter_info Implements hook_filter_info().
video_embed_field_filter_process Video Embed Field filter process callback
video_embed_field_get_form Create a form from the player configuration options $defaults will be passed in with the default settings for the various fields
video_embed_field_handler_vimeo_form Defines the form elements for the vimeo configuration form
video_embed_field_handler_youtube_form Defines the form elements for the youtube configuration form Eventually it might be nice to have these forms be available per instance instead of just global config
video_embed_field_handle_vimeo handler for vimeo videos Height and width need to be configurable or something I think
video_embed_field_handle_youtube handler for youtube videos
video_embed_field_requirements Implementation of hook_requirements Warn users if they are using the default settings because they haven't updated their fields
video_embed_field_video_embed_handler_info Implementation of hook_video_embed_handler_info
video_embed_get_handlers Creates a hook that other modules can implement to get handlers - hook_video_embed_handler_info Can be used to add more handlers if needed - from other modules and such
_video_embed_field_array_filter