jazzband / django-embed-video

Django app for easy embedding YouTube and Vimeo videos and music from SoundCloud.
http://django-embed-video.rtfd.org
MIT License
382 stars 135 forks source link

Added `video_embed` tag that accepts kwargs #20

Closed bburan closed 10 years ago

bburan commented 10 years ago

Some video backends support optional arguments embedded in the URL query string that adjust how the video is displayed (e.g. Youtube supports rel=0 which means don't show related videos). Created a tag that takes keyword arguments and embeds them into the URL query string.

This tag also supports appending to existing queries hard-coded in the video backend URL (e.g. Youtube's backend has a hard-coded query of wmod=opaque).

yetty commented 10 years ago

Hi, thank you for your pull request. I have added few comments direct to relevant lines.

bburan commented 10 years ago

No problem. I will address your comments and update. It may take a while as I will need to figure out how the VideoNode works and how one would extract kwargs from the template tag as well as handle both behaviors (e.g. block and inline tags) as well as the context manager (i.e. the 'as' statement).

yetty commented 10 years ago

No problem, take your time.

It could help solution in sorl.thumbnail:

bburan commented 10 years ago

@yetty - Finally got around to implementing the changes you suggested. I amended the original commit and force-pushed to github so that all changes would appear as a single commit if accepted. I also added unit tests and documentation for the new features. Please let me know what you think and I can make changes as needed.

yetty commented 10 years ago

Great job done. Merged.