This repository has been archived on 2024-08-27. You can view files and clone it, but cannot push or open issues or pull requests.
negromate_origins/web/negromateweb/templates/video.html

47 lines
1.4 KiB
HTML

{% extends "base.html" %}
{% block content %}
<h1>{{ video.name }}</h1>
{% if video.original %}
<p><b>Original:</b> {{ video.original }}</p>
{% endif %}
{% if video.author %}
<p><b>Autoría:</b> {{ video.author }}</p>
{% endif %}
{% if video.video %}
<video id="{{ video.path.name }}-video" class="video-js"
controls preload="auto" width="640" height="264"
{% if video.cover %}poster="{{ video.cover|url }}"{% endif %}>
<source src="{{ video.video|url }}" type='video/mp4'>
{% if video.vtt %}
<track kind="captions" src="{{ video.vtt|url }}" srclang="nm" label="Negro mate" default>
{% endif %}
<p class="vjs-no-js">
To view this video please enable JavaScript, and consider upgrading to a web browser that
<a href="https://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
</p>
</video>
{% endif %}
{% if video.files %}
<ul class="files">
{% for entry in video.files %}
<li><a href="{{ entry|url }}">{{ entry.name }}</a></li>
{% endfor %}
</ul>
{% endif %}
<script>
videojs('{{ video.path.name }}-video', {
plugins: {
{% if video.ass %}
ass: {
'src': ["{{ video.ass|url }}"],
// videoWidth: 640,
// videoHeight: 360,
// enableSvg: false
}
{% endif %}
},
});
</script>
{% endblock %}