Did I find the right examples for you? yes no

All Samples(5)  |  Call(2)  |  Derive(0)  |  Import(3)
Renders the video.

:param str url:
:param int width:
:param int height:
:param str plugin_uid: Preferred plugin to render to video.
:return str: Returns empty string on failure.

        def render_video(url, width=None, height=None, plugin_uid=None):
    """
    Renders the video.

    :param str url:
    :param int width:
    :param int height:
    :param str plugin_uid: Preferred plugin to render to video.
    :return str: Returns empty string on failure.
    """
    # Preferred plugin has been given. Try to render.
    if plugin_uid:
        plugin_cls = plugin_registry.get(plugin_uid)

        if not plugin_cls:
            # TODO: Log warnings
            return ''

        plugin = plugin_cls()
        if plugin.match(url):
            return plugin.render(url=url, width=width, height=height)
        else:
            # TODO: Log warnings
            return ''

    # No preferred plugin has been given. Detect which one shall be used and render.
    for plugin_uid, plugin_cls in get_registered_plugins():
        plugin = plugin_cls()
        if plugin.match(url):
            return plugin.render(url=url, width=width, height=height)

    return ''
        


src/d/j/django-dash-0.4.4/src/dash/contrib/plugins/video/dash_plugins.py   django-dash(Download)
from django.utils.translation import ugettext_lazy as _
 
from vishap import render_video
 
from dash.base import BaseDashboardPlugin
    def post_processor(self):
        self.data.embed_code = render_video(self.data.url)
 
# ********************************************************************************
# ********** Generating and registering the plugins using factory ****************

src/d/j/django-dash-HEAD/src/dash/contrib/plugins/video/dash_plugins.py   django-dash(Download)
from django.utils.translation import ugettext_lazy as _
 
from vishap import render_video
 
from dash.base import BaseDashboardPlugin
    def post_processor(self):
        self.data.embed_code = render_video(self.data.url)
 
# ********************************************************************************
# ********** Generating and registering the plugins using factory ****************

src/v/i/vishap-0.1/src/vishap/test.py   vishap(Download)
from vishap.conf import set_setting, get_setting, reset_to_defaults_settings
from vishap import defaults
from vishap import get_registered_plugin_uids, render_video
from vishap.base import BaseVideoPlugin, plugin_registry