Reputation: 193
How can I give a YouTube link and embed that video in a django template?
Upvotes: 2
Views: 13150
Reputation: 2466
Little self-promo, but you can try django-embed-video. It provides you simple embeding of Youtube and Vimeo videos, thumbnails etc.
Upvotes: 5
Reputation: 7740
Just right on the youtube video and select Copy Embed HTML and Paste it in your template.
Example:
<object style="height: 390px; width: 640px"><param name="movie" value="http://www.youtube.com/v/v1gTI4BOPUw?version=3"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><embed src="http://www.youtube.com/v/v1gTI4BOPUw?version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="390"></object>
Upvotes: 5