vishap package¶
vishap.base module¶
- class vishap.base.BaseVideoPlugin[source]¶
Bases: object
Base video plugin.
- description = None¶
- embed_code = None¶
- height_param_code = 'height="{height}"'¶
- id_pattern = None¶
- name = None¶
- render(url, width=None, height=None)[source]¶
Renders the HTML code of embed video based on from URL given.
Parameters: - url (str) –
- width (int) –
- height (int) –
Return str:
- thumbnail_pattern = None¶
- uid = None¶
- url_pattern = None¶
- width_param_code = 'width="{width}"'¶
vishap.utils module¶
- vishap.utils.render_video(url, width=None, height=None, plugin_uid=None)[source]¶
Renders the video.
Parameters: - url (str) –
- width (int) –
- height (int) –
- plugin_uid (str) – Preferred plugin to render to video.
Return str: Returns empty string on failure.