feat: show gif media
This commit is contained in:
parent
e4f8b03ae3
commit
d4ab339173
1 changed files with 11 additions and 1 deletions
|
@ -71,6 +71,11 @@
|
|||
{% for media in thread.media_attachments %}
|
||||
{% if media.type == 'image'%}
|
||||
<img src="{{media.url}}" />
|
||||
{% elif media.type == 'gifv' %}
|
||||
<video controls autoplay>
|
||||
<source src="{{media.url}}" type="video/mp4">
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
@ -87,6 +92,11 @@
|
|||
{% for media in descendant.media_attachments%}
|
||||
{% if media.type == 'image'%}
|
||||
<img src="{{media.url}}" />
|
||||
{% elif media.type == 'gifv' %}
|
||||
<video controls autoplay>
|
||||
<source src="{{media.url}}" type="video/mp4">
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue