You are here

function video_filter_codec_info in Video Filter 7.3

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. 6.2 video_filter.codecs.inc \video_filter_codec_info()

Implements hook_codec_info().

File

./video_filter.codecs.inc, line 11
This file contains all codecs provided by Video Filter.

Code

function video_filter_codec_info() {
  $codecs = array();
  $codecs['archive'] = array(
    'name' => t('Archive.org'),
    'sample_url' => '//www.archive.org/details/DrupalconBoston2008-TheStateOfDrupal',
    'callback' => 'video_filter_archive',
    'html5_callback' => 'video_filter_archive',
    'regexp' => '/archive\\.org\\/details\\/([\\w-_\\.]+)/i',
    'ratio' => 4 / 3,
  );
  $codecs['bliptv'] = array(
    'name' => t('Blip.tv'),
    'sample_url' => '//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['candidcareer'] = array(
    'name' => t('Candid Career'),
    'sample_url' => '//www.candidcareer.com/embed.php?vkey=ed5fdd900a274930252f&shared=CandidCareer&uid=30',
    'callback' => 'video_filter_candidcareer',
    'regexp' => '/candidcareer\\.com\\/embed\\.php\\?vkey=([a-zA-Z0-9\\-_&;]+)shared=([a-zA-Z0-9\\-_&;]+)uid=([a-zA-Z0-9\\-_&;]+)/',
    'ratio' => 16 / 9,
    'control_bar_height' => 20,
  );
  $codecs['capped'] = array(
    'name' => t('Capped'),
    'sample_url' => '//capped.tv/playeralt.php?vid=some-title',
    'callback' => 'video_filter_capped',
    'regexp' => '/capped\\.tv\\/([a-zA-Z0-9\\-_]+)/',
    'ratio' => 425 / 355,
  );
  $codecs['collegehumor'] = array(
    'name' => t('College Humor'),
    'sample_url' => '//www.collegehumor.com/video:1234567890',
    'callback' => 'video_filter_collegehumor',
    'regexp' => '/collegehumor\\.com\\/video\\:([0-9]+)/',
    'ratio' => 16 / 9,
    'control_bar_height' => 0,
  );
  $codecs['coub'] = array(
    'name' => t('Coub'),
    'sample_url' => '//coub.com/view/b7ghv',
    'callback' => 'video_filter_coub',
    'html5_callback' => 'video_filter_coub',
    'regexp' => '/coub\\.com\\/view\\/([a-z0-9]+)/i',
    'ratio' => 4 / 3,
  );
  $codecs['dailymotion'] = array(
    'name' => t('DailyMotion'),
    'sample_url' => '//www.dailymotion.com/video/some_video_title',
    'callback' => 'video_filter_dailymotion',
    'html5_callback' => 'video_filter_dailymotion_html5',
    'regexp' => '/dailymotion\\.com\\/video\\/([a-z0-9\\-_]+)/i',
    'ratio' => 4 / 3,
    'control_bar_height' => 20,
  );
  $codecs['democracynow_fullshow'] = array(
    'name' => t('DemocracyNow Fullshow'),
    'sample_url' => '//www.democracynow.org/shows/2015/3/20',
    'callback' => 'video_filter_democracynow_fullshow',
    'regexp' => '/democracynow\\.org\\/shows\\/([0-9]+)\\/([0-9]+)\\/([0-9]+)/',
    'ratio' => 16 / 9,
    'control_bar_height' => 0,
  );
  $codecs['democracynow_story'] = array(
    'name' => t('DemocracyNow Story'),
    'sample_url' => '//www.democracynow.org/2015/3/23/yemen_in_crisis_us_closes_key',
    'callback' => 'video_filter_democracynow_story',
    'regexp' => '/democracynow\\.org\\/([0-9]+)\\/([0-9]+)\\/([0-9]+)\\/([a-zA-Z0-9\\-_]+)/',
    'ratio' => 16 / 9,
    'control_bar_height' => 0,
  );
  $codecs['flickr_slideshows'] = array(
    'name' => t('Flickr Slideshows'),
    'sample_url' => '//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' => '//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['foxnews'] = array(
    'name' => t('Fox News'),
    'sample_url' => '//video.foxnews.com/v/123456/the-title/',
    'callback' => 'video_filter_foxnews',
    'html5_callback' => 'video_filter_foxnews',
    'regexp' => '/video\\.foxnews\\.com\\/v\\/([0-9]+)\\/([a-zA-Z0-9\\-]+)/i',
    'ratio' => 466 / 263,
    'control_bar_height' => 0,
  );
  $codecs['gametrailers'] = array(
    'name' => t('Game Trailers'),
    'sample_url' => '//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' => 16 / 9,
  );
  $codecs['gamevideos'] = array(
    'name' => t('Game Videos'),
    'sample_url' => '//gamevideos.1up.com/video/id/12345',
    'callback' => 'video_filter_gamevideos',
    'regexp' => '/gamevideos\\.1up\\.com\\/video\\/id\\/([0-9]+)/',
    'ratio' => 500 / 319,
  );
  $codecs['giphy'] = array(
    'name' => t('Giphy'),
    'sample_url' => '//giphy.com/gifs/disney-kids-peter-pan-[gif-id]',
    'callback' => 'video_filter_giphy',
    'html5_callback' => 'video_filter_giphy',
    'regexp' => '/giphy\\.com\\/gifs\\/(([a-zA-Z0-9\\-]+)\\-|)([a-zA-Z0-9]+)/i',
    'ratio' => 16 / 9,
  );
  $codecs['godtube'] = array(
    'name' => t('GodTube'),
    'sample_url' => '//www.godtube.com/watch/?v=123abc',
    'callback' => 'video_filter_godtube',
    'regexp' => '/godtube\\.com\\/watch\\/\\?v=([a-z0-9\\-_]+)/i',
    'ratio' => 400 / 283,
    'control_bar_height' => 40,
  );
  $codecs['google'] = array(
    'name' => t('Google Video'),
    'sample_url' => '//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['instagram'] = array(
    'name' => t('Instagram'),
    'callback' => 'video_filter_instagram',
    'sample_url' => '//instagram.com/p/uN1qUeId',
    'regexp' => array(
      '/instagram\\.com\\/p\\/([a-z0-9\\-_]+)/i',
      '/instagr.am\\/p\\/([a-z0-9\\-_]+)/i',
    ),
    'ratio' => 612 / 710,
  );
  $codecs['metacafe'] = array(
    'name' => t('Meta Cafe'),
    'sample_url' => '//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['mailru'] = array(
    'name' => t('Mail.Ru'),
    'sample_url' => '//my.mail.ru/v/semenikhin_denis/video/_groupvideo/[video-id].html',
    'callback' => 'video_filter_mailru',
    'html5_callback' => 'video_filter_mailru',
    'regexp' => '/my\\.mail\\.ru\\/v\\/(.*)\\/([0-9]+)\\.html/i',
    'ratio' => 16 / 9,
    'control_bar_height' => 0,
  );
  $codecs['myspace'] = array(
    'name' => t('MySpace'),
    'sample_url' => '//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['myvideo'] = array(
    'name' => t('MyVideo'),
    'sample_url' => '//www.myvideo.de/filme/story-title-1234567890',
    'html5_callback' => 'video_filter_myvideo',
    'callback' => 'video_filter_myvideo',
    'regexp' => array(
      '/myvideo\\.de\\/(.+)\\-([0-9]+)/i',
    ),
    'ratio' => 400 / 283,
  );
  $codecs['picasa_slideshows'] = array(
    'name' => t('Picasa Slideshows'),
    'sample_url' => '//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: //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['rutube'] = array(
    'name' => t('Rutube'),
    'sample_url' => '//rutube.ru/video/c80617086143e80ee08f760a2e9cbf43/?pl_type=source&pl_id=8188',
    'html5_callback' => 'video_filter_rutube',
    'callback' => 'video_filter_rutube',
    'regexp' => array(
      '/rutube\\.ru\\/(.*)/i',
    ),
    'ratio' => 16 / 9,
  );
  $codecs['slideshare'] = array(
    'name' => t('Slideshare'),
    'sample_url' => '//slideshare.net/1759622',
    'callback' => 'video_filter_slideshare',
    'instructions' => t('You need to construct your own URL, using the "Wordpress Embed" code from Slideshare, extract the "id", and form the URL like this: slideshare.net/1759622'),
    'regexp' => array(
      '/slideshare\\.net\\/\\?id=([a-z0-9]+)/',
      '/slideshare\\.net\\/([a-z0-9]+)/',
    ),
    'ratio' => 425 / 355,
  );
  $codecs['soundcloud'] = array(
    'name' => t('SoundCloud'),
    'sample_url' => '//soundcloud.com/bigbabydram/broccoli',
    'callback' => 'video_filter_soundcloud',
    'instructions' => t(''),
    'regexp' => array(
      '/soundcloud\\.com\\/([a-z0-9]+)\\/([a-z0-9]+)/',
    ),
    'ratio' => 4 / 3,
  );
  $codecs['streamhoster'] = array(
    'name' => t('Streamhoster'),
    'sample_url' => '//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['teachertube'] = array(
    'name' => t('Teachertube'),
    'sample_url' => '//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,
  );
  $codecs['ted'] = array(
    'name' => t('TED'),
    'sample_url' => '//www.ted.com/talks/[story-title]',
    'instructions' => t('Click in Embed and copy the "Link to this talk" link and paste here.'),
    'callback' => 'video_filter_ted',
    'html5_callback' => 'video_filter_ted',
    'regexp' => '/ted\\.com\\/talks\\/lang\\/([a-zA-Z]+)\\/([a-zA-Z0-9\\-_]+)(\\.html)?/',
    'ratio' => 4 / 3,
  );
  $codecs['twitch'] = array(
    'name' => t('Twitch'),
    'sample_url' => '//www.twitch.tv/uN1qUe-I_d',
    'callback' => 'video_filter_twitch',
    'regexp' => '/twitch\\.tv\\/([a-z0-9\\-_]+)/i',
    'ratio' => 16 / 9,
  );
  $codecs['ustream'] = array(
    'name' => t('Ustream'),
    'sample_url' => '//www.ustream.tv/recorded/111212121212',
    'html5_callback' => 'video_filter_ustream',
    'callback' => 'video_filter_ustream',
    'regexp' => '/ustream\\.tv\\/recorded\\/([0-9]+)/i',
    'ratio' => 16 / 9,
  );
  $codecs['vbox'] = array(
    'name' => t('Vbox7'),
    'sample_url' => '//vbox7.com/play:b4a7291f3d',
    'callback' => 'video_filter_vbox',
    'regexp' => '/vbox7\\.com\\/play\\:([a-z0-9]+)/i',
    'ratio' => 400 / 345,
  );
  $codecs['vimeo'] = array(
    'name' => t('Vimeo'),
    'sample_url' => '//www.vimeo.com/123456',
    'callback' => 'video_filter_vimeo',
    'html5_callback' => 'video_filter_vimeo_html5',
    'regexp' => '/vimeo\\.com\\/([0-9]+)/',
    'ratio' => 16 / 9,
    'control_bar_height' => 0,
  );
  $codecs['vine'] = array(
    'name' => t('Vine'),
    'sample_url' => '//www.vine.co/v/uN1qUeId',
    'callback' => 'video_filter_vine',
    'regexp' => '/vine\\.co\\/v\\/([0-9a-z]+)/i',
    'ratio' => 4 / 3,
  );
  $codecs['whatchado'] = array(
    'name' => t('whatchado'),
    'sample_url' => '//www.whatchado.com/en/stories/some-title',
    'callback' => 'video_filter_whatchado',
    'regexp' => array(
      '/whatchado\\.com\\/[a-z]{2}\\/stories\\/([\\w-_]+)/i',
      '/whatchado\\.com\\/[a-z]{2}\\/([\\w-_]+)/i',
    ),
    'ratio' => 960 / 540,
  );
  $codecs['wistia'] = array(
    'name' => t('Wistia'),
    'sample_url' => '//wistia.com/medias/9pj9n6ftlk',
    'callback' => 'video_filter_wistia_html5',
    'html5_callback' => 'video_filter_wistia_html5',
    'regexp' => '@https?://(.+\\.)?(wistia\\.(com|net)|wi\\.st)/((m|medias|projects)|embed/(iframe|playlists))/([a-zA-Z0-9]+)@',
  );
  $codecs['youku'] = array(
    'name' => t('YouKu'),
    'sample_url' => '//v.youku.com/v_show/id_XNjgzNDM4MzIw.html',
    'callback' => 'video_filter_youku_html5',
    'html5_callback' => 'video_filter_youku_html5',
    'regexp' => array(
      '/youku\\.com\\/v_show\\/id_([a-z0-9\\-_=]+)\\.html/i',
      '/youku\\.com\\/player\\.php\\/sid\\/([a-z0-9\\-_=]+)/i',
    ),
    'ratio' => 16 / 9,
    'control_bar_height' => 50,
  );
  $codecs['youtube'] = array(
    'name' => t('YouTube'),
    'sample_url' => '//www.youtube.com/watch?v=uN1qUeId',
    'callback' => 'video_filter_youtube',
    'html5_callback' => 'video_filter_youtube_html5',
    'regexp' => array(
      '/youtube\\.com\\/watch\\?.*?v=([a-z0-9\\-_]+)/i',
      '/youtu.be\\/([a-z0-9\\-_]+)/i',
      '/youtube\\.com\\/v\\/([a-z0-9\\-_]+)/i',
      '/youtube\\.com\\/embed\\/([a-z0-9\\-_]+)/i',
    ),
    'ratio' => 16 / 9,
    'control_bar_height' => 0,
  );
  $codecs['youtube_playlist'] = array(
    'name' => t('YouTube (Playlist)'),
    'sample_url' => '//www.youtube.com/playlist?list=uN1qUeId',
    'callback' => 'video_filter_youtube_playlist_html5',
    'regexp' => array(
      '/youtube\\.com\\/playlist\\?list=([a-z0-9\\-_]+)/i',
    ),
    'ratio' => 16 / 9,
    'control_bar_height' => 0,
  );
  return $codecs;
}