From 79a3f35886241e88195d82bac0d54451121d43af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20Soli=CC=81s?= Date: Mon, 25 Nov 2013 13:52:22 +0100 Subject: [PATCH] By SamuelSolis: Added support for TED. --- video_filter.codecs.inc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/video_filter.codecs.inc b/video_filter.codecs.inc index 5b1711b..85b8760 100644 --- a/video_filter.codecs.inc +++ b/video_filter.codecs.inc @@ -20,6 +20,16 @@ function video_filter_codec_info() { 'ratio' => 4 / 3, ); + $codecs['ted'] = array( + 'name' => t('TED'), + 'instructions' => t('Click in Embed and copy the link -Link to this talk- 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/', + 'sample_url' => 'http://www.ted.com/talks/lang/es/tim_berners_lee_on_the_next_web.html', + 'ratio' => 4 / 3, + ); + $codecs['bliptv'] = array( 'name' => t('Blip.tv'), 'sample_url' => 'http://blip.tv/file/123456', @@ -349,6 +359,17 @@ function video_filter_flickr_slideshows($video) { } /** + * Callback for Ted.com codec. + * + * @see video_filter_codec_info() + */ +function video_filter_ted($video) { + $video['source'] = 'http://embed.ted.com/talks/'.$video['codec']['matches'][2].'.html'; + + return video_filter_iframe($video); +} + +/** * Callback for Flickr Video codec. * * @see video_filter_codec_info() -- 1.7.11.1