mirror of
https://git.vectorsigma.ru/public/tubearchivist.git
synced 2026-08-05 04:19:27 +00:00
restructure video tag to add subtitle tracks
This commit is contained in:
@@ -3,10 +3,14 @@
|
||||
{% load static %}
|
||||
{% load humanize %}
|
||||
<div class="video-main">
|
||||
<video
|
||||
src="/media/{{ video.media_url }}"
|
||||
poster="/cache/{{ video.vid_thumb_url }}" controls preload="false"
|
||||
type='video/mp4' width="100%" playsinline id="video-item" ontimeupdate="onVideoProgress('{{ video.youtube_id }}')" onloadedmetadata="setVideoProgress(0)">
|
||||
<video poster="/cache/{{ video.vid_thumb_url }}" controls preload="false" width="100%" playsinline
|
||||
id="video-item" ontimeupdate="onVideoProgress('{{ video.youtube_id }}')" onloadedmetadata="setVideoProgress(0)">
|
||||
<source src="/media/{{ video.media_url }}" type="video/mp4">
|
||||
{% if video.subtitles %}
|
||||
{% for subtitle in video.subtitles %}
|
||||
<track label="{{subtitle.name}}" kind="subtitles" srclang="{{subtitle.lang}}" src="/media/{{subtitle.media_url}}">
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</video>
|
||||
</div>
|
||||
<div class="boxed-content">
|
||||
|
||||
Reference in New Issue
Block a user