@@ -139,6 +139,11 @@ Same as Wagtail Images, a custom model can be used to replace the built in Video
...
@@ -139,6 +139,11 @@ Same as Wagtail Images, a custom model can be used to replace the built in Video
)
)
Video text tracks:
~~~~~~~~~~~~~~~~~~
To enable the uploading and displaying of VTT tracks (e.g. subtitles, captions) you'll need to add ``wagtail.contrib.modeladmin`` to your installed apps.
Once added, there will be an new area in the admin for attaching VTT files to videos with associaled metadata.
<spanclass='transcode-error'>Ffmpeg is not found on your server. Please install if you wish to transcode videos into an HTML5 video compliant format.</span>
<spanclass='transcode-error'>Ffmpeg is not found on your server. Please install if you wish to transcode videos into an HTML5 video compliant format.</span>
{% endif %}
{% endif %}
</div>
{% if tracks_action_url %}
<divclass="col2 ">
<h2class="u-text-transform-uppercase">Tracks</h2>
<dl>
<p>You can add/edit subtitles or accessibility captions for this video. For information about the filetype that should be used see the mozilla docs on <ahref="https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API">WebVTT</a></p>
{% if video.thumbnail %}
{% if video.track_listing %}
<dt>{% trans "Thumbnail" %}</dt>
<ul>
<dd><imgsrc="{{ video.thumbnail.url }}"/></dd>
{% for track in video.track_listing.tracks.all %}
{% endif %}
<li>{{ track }}</li>
<dt>{% trans "Filesize" %}</dt>
{% endfor %}
<dd>{% if filesize %}{{ filesize|filesizeformat }}{% else %}{% trans "File not found" %}{% endif %}</dd>