Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Add http://video.mail.ru/ and http://rutube.ru
function video_filter_codec_info()
{
//...........
//...........
$codecs['rutube'] = array(
'name' => t('Rutube'),
'callback' => 'video_filter_rutube',
// http://rutube.ru/tracks/813899.html?v=849b004fbf521e1a4420b18221c63d80
'regexp' => '#rutube\.ru\/.*?\?v=([a-z0-9\-_]+)#i',
'ratio' => 400 / 353,
);
$codecs['mailru'] = array(
'name' => t('Mailru'),
'callback' => 'video_filter_mailru',
// http://video.mail.ru/mail/kutasov-a/mobile_video/4206.html?newbest_from_main=1
'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
Comment | File | Size | Author |
---|---|---|---|
#11 | add_ru.patch | 1.42 KB | Ramir |
Comments
Comment #1
blackdog CreditAttribution: blackdog commented@mkonk64 - Can you roll a proper patch for this?
Comment #2
OFF CreditAttribution: OFF commentedSupport is not expected?
Comment #3
blackdog CreditAttribution: blackdog commentedIf I get a proper patch I'll review it.
Comment #4
OFF CreditAttribution: OFF commentedA you dont made proper patch?
I will help with testing
Comment #5
blackdog CreditAttribution: blackdog commentedNo, but feel free to create a patch from the code in the first comment. Make sure it's up to coding standards though.
Comment #6
OFF CreditAttribution: OFF commentedI'am not coder (
Comment #7
duke333 CreditAttribution: duke333 commentedHi 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) ?
Comment #8
AlexanderPop CreditAttribution: AlexanderPop commentedhttp://www.drupal.ru/node/36532
Comment #9
Ingumsky CreditAttribution: Ingumsky commentedI'll try to implement the code from original post on my website later and will roll a patch if it works.
Comment #10
blackdog CreditAttribution: blackdog commentedComment #11
Ramir CreditAttribution: Ramir commentedComment #12
minnur CreditAttribution: minnur at Chapter Three commentedIs this still relevant ? Please review and provide a patch and I will add this to both D7 and D8 versions.
Comment #13
minnur CreditAttribution: minnur at Chapter Three commentedComment #14
minnur CreditAttribution: minnur at Chapter Three commentedThis has been added to D8 version with some modifications .
Comment #15
minnur CreditAttribution: minnur at Chapter Three commentedComment #16
minnur CreditAttribution: minnur at Chapter Three commentedComment #19
minnur CreditAttribution: minnur at Chapter Three commented