Add http://video.mail.ru/ and http://rutube.ru
mkonk64 - July 4, 2008 - 16:35
| Project: | Video Filter |
| Version: | 6.x-2.4 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Add http://video.mail.ru/ and http://rutube.ru
<?php
function video_filter_codec_info()
{
//...........
//...........
$codecs['rutube'] = array(
'name' => t('Rutube'),
'callback' => 'video_filter_rutube',
// <a href="http://rutube.ru/tracks/813899.html?v=849b004fbf521e1a4420b18221c63d80
" title="http://rutube.ru/tracks/813899.html?v=849b004fbf521e1a4420b18221c63d80
" rel="nofollow">http://rutube.ru/tracks/813899.html?v=849b004fbf521e1a4420b18221c63d80
</a> 'regexp' => '#rutube\.ru\/.*?\?v=([a-z0-9\-_]+)#i',
'ratio' => 400 / 353,
);
$codecs['mailru'] = array(
'name' => t('Mailru'),
'callback' => 'video_filter_mailru',
// <a href="http://video.mail.ru/mail/kutasov-a/mobile_video/4206.html?newbest_from_main=1
" title="http://video.mail.ru/mail/kutasov-a/mobile_video/4206.html?newbest_from_main=1
" rel="nofollow">http://video.mail.ru/mail/kutasov-a/mobile_video/4206.html?newbest_from_...</a> 'regexp' => array(0 => '#video\.mail\.ru\/mail\/(.*?)\/([0-9]*?)\.html#i',
),
'ratio' => 450 / 385,
);
return $codecs;
}
function video_filter_mailru($video) {
$video['source'] = 'http://img.mail.ru/r/video2/player_v2.swf?par=http://content.video.mail.ru/mail/'.$video['codec']['matches'][1].'/$'.$video['codec']['matches'][2].($video['autoplay'] ? '&autoplay=1' : '');
return video_filter_flash($video);
}
function video_filter_rutube($video) {
$video['source'] = 'http://video.rutube.ru/'.$video['codec']['matches'][1].($video['autoplay'] ? '&autoplay=1' : '');
return video_filter_flash($video);
}
?>Thank you for a module

#1
@mkonk64 - Can you roll a proper patch for this?