Django templatetag library to embed videos
JavaScript Python CSS ActionScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
djvideo
.gitignore
LICENSE
MANIFEST.in
README.md
VIDEOJS-LICENSE
setup.py

README.md

djvideo

About

This is a Django Video module. It allows you to embed video files, as well as players from YouTube and Vimeo.

Code

Code is at:

https://github.com/pculture/djvideo

License information is in the LICENSE file.

Usage

Embedding a video file directly:

{% load video %}
{% video [variable or string with the video file] [width] [height] %}
{% if video.url|is_ogg_media %}Here's a message about Ogg Video!{% endif %}

Embedding a YouTube/Vimeo player:

{% load generate_embed %}
{% if video.website_url|supports_embed_generation %}
{% generate_embed video.website_url width=1024 height=767 autoplay=1 %}
{% else %}
Do something else! We couldn't generate any embed code.
{% endif %}