Posted by mkonk64 on July 4, 2008 at 4:35pm
Jump to:
| Project: | Video Filter |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
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
Comments
#1
@mkonk64 - Can you roll a proper patch for this?
#2
Support is not expected?
#3
If I get a proper patch I'll review it.
#4
A you dont made proper patch?
I will help with testing
#5
No, but feel free to create a patch from the code in the first comment. Make sure it's up to coding standards though.
#6
I'am not coder (
#7
Hi all!
This code dasn`t works corectly
1. You don`t have image file (thumbnail)
2. you don`t have duration in seconds
some one have providers (file like rutube.inc or mailru.inc) ?
#8
http://www.drupal.ru/node/36532
#9
I'll try to implement the code from original post on my website later and will roll a patch if it works.
#10