Skip to content

Commit

Permalink
Library: improve the "view" direct link (#3561)
Browse files Browse the repository at this point in the history
relates to xibosignage/xibo#3561

- Added support for audio and video formats.
  • Loading branch information
nadzpogi committed Jan 20, 2025
1 parent f6edf81 commit 1ba1ad5
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion views/library-direct-media-details.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,19 @@
<p class="card-text">{% trans "Date Modified" %} : {{ media.modifiedDt }}</p>
<a href="{{ url_for("library.view")}}" class="btn btn-primary">{% trans "Go back to Library page" %}</a>
<hr>
<img src="{{ url_for("library.download", {id: media.mediaId}) }}" class="img-fluid" alt="{{ media.fileName }}" style="width: 100%;">
{% if media.mediaType == 'image' %}
<img src="{{ url_for("library.download", {id: media.mediaId}) }}" class="img-fluid" alt="{{ media.fileName }}">
{% elseif media.mediaType == 'video' %}
<video class="w-100" controls autoplay muted>
<source src="{{ url_for("library.download", {id: media.mediaId}) }}">
Your browser does not support the video tag.
</video>
{% elseif media.mediaType == 'audio' %}
<audio class="w-100" controls>
<source src="{{ url_for("library.download", {id: media.mediaId}) }}">
Your browser does not support the audio tag.
</audio>
{% endif %}
</div>
</div>
{% endblock %}

0 comments on commit 1ba1ad5

Please sign in to comment.