Add support for capped.tv

smokris - February 3, 2009 - 04:43
Project:Video Filter
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Here's a code snippet that adds support for capped.tv:

<?php
    $codecs
['capped'] = array(
       
'name' => t('Capped'),
       
'callback' => 'video_filter_capped',
       
'regexp' => '/capped\.tv\/playeralt.php\?vid=([a-zA-Z0-9\-_]+)/',
       
'ratio' => 425 / 355,
    );

...

function
video_filter_capped($video) {
   
$output = '<object width="'.$video['width'].'" height="'.$video['height'].'">';
   
$output .= '<param name="movie" value="http://capped.micksam7.com/playeralt.swf?vid='.$video['codec']['matches'][1].'" />';
   
$output .= '<param name="wmode" value="transparent" /><param name="allowFullScreen" value="true" />';
   
$output .= '<param name="bgcolor" value="#000000" />';
   
$output .= '<embed src="http://capped.micksam7.com/playeralt.swf?vid='.$video['codec']['matches'][1].'" wmode="transparent" bgcolor="#000000" allowFullScreen="true" width="'.$video['width'].'" height="'.$video['height'].'" type="application/x-shockwave-flash">';
   
$output .= '</embed></object>';

    return
$output;
}
?>

This should apply to both the latest 5.x and 6.x versions.

(Thanks, cwright, for putting this together.)

#1

smokris - April 27, 2009 - 13:44
Version:5.x-2.4» 6.x-2.x-dev

#2

blackdog - May 2, 2009 - 10:54
Status:needs review» fixed

Committed the attached patch.

AttachmentSize
368343_capped_tv.patch 1.17 KB

#3

System Message - May 16, 2009 - 11:00
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.