Here's a code snippet that adds support for capped.tv:
$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.)
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 368343_capped_tv.patch | 1.17 KB | blackdog |
Comments
Comment #1
smokrisComment #2
blackdog commentedCommitted the attached patch.