How to add rutube.ru?
How to add rutube.ru
3 posts Started 13 years ago by anigafu Latest reply from anigafu
-
-
I can't read rutube.ru to figure out how to embed their videos, but take a look at ./mediacore/config/app_cfg.py. You can probably add another entry to the base_config.embeddable_filetypes dictionary. It looks like this, right now:
base_config.embeddable_filetypes = { 'youtube': { 'play': 'http://youtube.com/v/%s', 'link': 'http://youtube.com/watch?v=%s', 'pattern': re.compile('^(http(s?)://)?(www.)?youtube.com/watch\?(.*&)?v=(?P<id>[^&#]+)') }, 'google': { 'play': 'http://video.google.com/googleplayer.swf?docid=%s&hl=en&fs=true', 'link': 'http://video.google.com/videoplay?docid=%s', 'pattern': re.compile('^(http(s?)://)?video.google.com/videoplay\?(.*&)?docid=(?P<id>-\d+)') }, 'vimeo': { 'play': 'http://vimeo.com/moogaloop.swf?clip_id=%s&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1', 'link': 'http://vimeo.com/%s', 'pattern': re.compile('^(http(s?)://)?(www.)?vimeo.com/(?P<id>\d+)') }, }
Make a new entry inside there for rutube, like the youtube one. You can see how the %s stands in for the video ID in the 'play' and 'link' strings, and the 'pattern' string is a regular expression to recognize rutube.ru urls.
Then you should be able to add rutube.ru videos just like youtube or google video, through the admin interface.
-
thanks
Reply
You must log in to post.