TAGS :Viewed: 10 - Published at: a few seconds ago

[ resizing player in django-embed-video ]

Is there any way to resize the embedded youtube player using django-embed-video? Using regular iframe tags, like this, doesn't work:

<iframe  src="{{ video myvideo.link }}" frameborder="0" border="0" cellspacing="0" style="border-enter code here`style: none;width: 100%; height: 120px;"></iframe>

The docs don't say anything about this, either.

Answer 1


It is possible. See the docs:

http://django-embed-video.readthedocs.org/en/v1.0.0/examples.html#template-examples

From the link:

Default sizes are tiny (420x315), small (480x360), medium (640x480), large (960x720) and huge (1280x960). You can set your own size:

{% video my_video '800x600' %}

This usage has been added in version 0.7.

And use relative percentual size:

{% video my_video '100% x 50%' %}