diff --git a/video_filter.codecs.inc b/video_filter.codecs.inc index 77dee4c..95e9511 100644 --- a/video_filter.codecs.inc +++ b/video_filter.codecs.inc @@ -223,6 +223,15 @@ function video_filter_codec_info() { 'ratio' => 16 / 9, 'control_bar_height' => 25, ); + + $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)?/', + 'ratio' => 4 / 3, + ); return $codecs; } @@ -349,6 +358,18 @@ 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'][3].'.html'; + return video_filter_iframe($video); +} + + + +/** * Callback for Flickr Video codec. * * @see video_filter_codec_info()