You are here

function video_filter_codec_info in Video Filter 6.2

Same name and namespace in other branches
  1. 5.2 video_filter.codecs.inc \video_filter_codec_info()
  2. 5 video_filter.codecs.inc \video_filter_codec_info()
  3. 6.3 video_filter.codecs.inc \video_filter_codec_info()
  4. 6 video_filter.codecs.inc \video_filter_codec_info()
  5. 7.3 video_filter.codecs.inc \video_filter_codec_info()

File

./video_filter.codecs.inc, line 3

Code

function video_filter_codec_info() {
  $codecs = array();
  $codecs['youtube'] = array(
    'name' => t('YouTube'),
    'sample_url' => 'http://www.youtube.com/watch?v=uN1qUeId',
    'callback' => 'video_filter_youtube',
    'regexp' => '/youtube\\.com\\/watch\\?v=([a-z0-9\\-_]+)/i',
    'ratio' => 16 / 9,
    'control_bar_height' => 25,
  );
  $codecs['google'] = array(
    'name' => t('Google Video'),
    'sample_url' => 'http://video.google.com/videoplay?docid=-uN1qUeId',
    'callback' => 'video_filter_google',
    'regexp' => '/video\\.google\\.[a-z]+\\.?[a-z]+?\\/videoplay\\?docid=(\\-?[0-9]+)/',
    'ratio' => 400 / 326,
  );
  $codecs['tangle'] = array(
    'name' => t('Tangle'),
    'sample_url' => 'http://www.tangle.com/view_video?viewkey=b2e45d2a30cb0f5cad38',
    'callback' => 'video_filter_tangle',
    'regexp' => array(
      '/tangle\\.com\\/view_video\\.php\\?viewkey=([a-z0-9]+)/',
      '/tangle\\.com\\/view_video\\?viewkey=([a-z0-9]+)/',
    ),
    'ratio' => 330 / 270,
  );
  $codecs['dailymotion'] = array(
    'name' => t('DailyMotion'),
    'sample_url' => 'http://www.dailymotion.com/video/some_video_title',
    'callback' => 'video_filter_dailymotion',
    'regexp' => '/dailymotion\\.com\\/video\\/([a-z0-9\\-_]+)/i',
    'ratio' => 4 / 3,
    'control_bar_height' => 20,
  );
  $codecs['revver'] = array(
    'name' => t('Revver'),
    'sample_url' => 'http://revver.com/video/123456/the-title/',
    'callback' => 'video_filter_revver',
    'regexp' => '/revver\\.com\\/video\\/([0-9]+)/',
    'ratio' => 408 / 324,
  );
  $codecs['vimeo'] = array(
    'name' => t('Vimeo'),
    'sample_url' => 'http://www.vimeo.com/123456',
    'callback' => 'video_filter_vimeo',
    'regexp' => '/vimeo\\.com\\/([0-9]+)/',
    'ratio' => 16 / 9,
    'control_bar_height' => 0,
  );
  $codecs['flickr_slideshows'] = array(
    'name' => t('Flickr Slideshows'),
    'sample_url' => 'http://www.flickr.com/photos/username/sets/1234567890/show/',
    'callback' => 'video_filter_flickr_slideshows',
    'regexp' => '/flickr\\.com\\/photos\\/([a-zA-Z0-9@_\\-]+)\\/sets\\/([0-9]+)\\/?[show]?\\/?/i',
    'ratio' => 4 / 3,
    'control_bar_height' => 0,
  );
  $codecs['flickr_video'] = array(
    'name' => t('Flickr Video'),
    'sample_url' => 'http://www.flickr.com/photos/hansnilsson/1234567890/',
    'callback' => 'video_filter_flickr_video',
    'regexp' => '/flickr\\.com\\/photos\\/([a-zA-Z0-9@_\\-]+)\\/([0-9]+)/',
    'ratio' => 4 / 3,
    'control_bar_height' => 0,
  );
  $codecs['gamevideos'] = array(
    'name' => t('Game Videos'),
    'sample_url' => 'http://gamevideos.1up.com/video/id/12345',
    'callback' => 'video_filter_gamevideos',
    'regexp' => '/gamevideos\\.1up\\.com\\/video\\/id\\/([0-9]+)/',
    'ratio' => 500 / 319,
  );
  $codecs['metacafe'] = array(
    'name' => t('Meta Cafe'),
    'sample_url' => 'http://www.metacafe.com/watch/1234567890/some_title/',
    'callback' => 'video_filter_metacafe',
    'regexp' => '/metacafe\\.com\\/watch\\/([a-z0-9\\-_]+)\\/([a-z0-9\\-_]+)/i',
    'ratio' => 400 / 313,
    'control_bar_height' => 32,
  );
  $codecs['streamhoster'] = array(
    'name' => t('Streamhoster'),
    'sample_url' => 'http://web26.streamhoster.com/username/filename.flv',
    'callback' => 'video_filter_streamhoster',
    'regexp' => '/([a-z0-9]+)\\:\\/\\/([a-z0-9\\-_]+)\\.streamhoster\\.com\\/([a-z0-9\\-_]+)\\/([a-z0-9\\-_\\.]+)/i',
    'ratio' => 480 / 360,
  );
  $codecs['gametrailers'] = array(
    'name' => t('Game Trailers'),
    'sample_url' => 'http://www.gametrailers.com/video/some-title/12345',
    'callback' => 'video_filter_gametrailers',
    'regexp' => array(
      '/gametrailers\\.com\\/player\\/([0-9]+)/',
      '/gametrailers\\.com\\/video\\/([a-z0-9\\-_]+)\\/([0-9]+)/',
    ),
    'ratio' => 480 / 392,
  );
  $codecs['collegehumor'] = array(
    'name' => t('College Humor'),
    'sample_url' => 'http://www.collegehumor.com/video:1234567890',
    'callback' => 'video_filter_collegehumor',
    'regexp' => '/collegehumor\\.com\\/video\\:([0-9]+)/',
    'ratio' => 16 / 9,
    'control_bar_height' => 0,
  );
  $codecs['myspace'] = array(
    'name' => t('MySpace'),
    'sample_url' => 'http://myspace.com/video/vid/1234567890',
    'callback' => 'video_filter_myspace',
    'regexp' => array(
      '/vids\\.myspace\\.com\\/.*VideoID=([0-9]+)/i',
      '/myspace\\.com\\/video\\/([a-z])+\\/([0-9]+)/i',
      '/myspace\\.com\\/video\\/([a-z0-9\\-_]+)\\/([a-z0-9\\-_]+)\\/([a-z0-9]+)/i',
      '/myspace\\.com\\/([a-z0-9\\-_]+)\\/videos\\/([a-z0-9\\-_]+)\\/([a-z0-9]+)/i',
    ),
    'ratio' => 620 / 400,
    'control_bar_height' => 40,
  );
  $codecs['capped'] = array(
    'name' => t('Capped'),
    'sample_url' => 'http://capped.tv/playeralt.php?vid=some-title',
    'callback' => 'video_filter_capped',
    'regexp' => '/capped\\.tv\\/([a-zA-Z0-9\\-_]+)/',
    'ratio' => 425 / 355,
  );
  $codecs['bliptv'] = array(
    'name' => t('Blip.tv'),
    'sample_url' => 'http://blip.tv/file/123456',
    'callback' => 'video_filter_bliptv',
    'regexp' => array(
      '@blip\\.tv/rss/flash/([^"\\&\\?/]+)@i',
      '@blip\\.tv/file/view/([^"\\&\\?/]+)@i',
      '@blip\\.tv/file/([^"\\&\\?/]+)@i',
      '@blip\\.tv/play/([^"\\&\\?/]+)@i',
    ),
    'ratio' => 16 / 9,
    'control_bar_height' => 30,
  );
  $codecs['slideshare'] = array(
    'name' => t('Slideshare'),
    'sample_url' => 'http://slideshare.net/?id=1759622&doc=usingdrupal-090723103440-phpapp01',
    'callback' => 'video_filter_slideshare',
    'instructions' => t('You need to construct your own URL, using the "Wordpress Embed" code from Slideshare, extract the "id" and "doc" parts, and form the URL like this: slideshare.net/?id=1759622&doc=usingdrupal-090723103440-phpapp01.'),
    'regexp' => '/slideshare\\.net\\/\\?id=([a-z0-9]+).*doc=([a-z0-9-]+)/',
    'ratio' => 425 / 320,
    'control_bar_height' => 38,
  );
  $codecs['picasa_slideshows'] = array(
    'name' => t('Picasa Slideshows'),
    'sample_url' => 'http://picasaweb.google.com/data/feed/base/user/USER_NAME/albumid/5568104935784209834?alt=rss&kind=photo&hl=en_US',
    'callback' => 'video_filter_picasa_slideshows',
    'instructions' => t('You must use the URL of the RSS feed for the Picasa album:') . '<ol>' . '<li>' . t('View the album in Picasa (you should see thumbnails, not a slideshow).') . '</li>' . '<li>' . t('Find the "RSS" link and click it.') . '</li>' . '<li>' . t('Copy the resulting URL from the browser address bar.  Example: ') . '<br />' . '<code>[video: http://picasaweb.google.com/data/feed/base/user/USER_NAME/albumid/5568104935784209834?alt=rss&amp;kind=photo&amp;hl=en_US]</code>' . '</li>' . '</ol>',
    'regexp' => '/picasaweb\\.google\\.com\\/data\\/feed\\/base\\/user\\/([a-zA-Z0-9@_\\-]+)\\/albumid\\/([a-z0-9]+)/i',
    'ratio' => 800 / 600,
  );
  $codecs['teachertube'] = array(
    'name' => t('Teachertube'),
    'sample_url' => 'http://www.teachertube.com/viewVideo.php?video_id=VIDEOID',
    'callback' => 'video_filter_teachertube',
    'regexp' => '/teachertube\\.com\\/viewVideo.php\\?video_id\\=([0-9]+)/i',
    'ratio' => 16 / 9,
  );
  return $codecs;
}