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
#2
Committed the attached patch.
#3
Automatically closed -- issue fixed for 2 weeks with no activity.