Mercurial > sat_legacy_website
comparison templates/sat_website/video.html @ 92:7a79cb5ed43b
add subtitles in video metadata and <track /> elements
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 16 Jun 2015 20:31:16 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
91:2de2c50a796d | 92:7a79cb5ed43b |
---|---|
1 {% comment %} | |
2 SàT website: Salut à Toi's presentation website | |
3 Copyright (C) 2012 Jérôme Poisson (goffi@goffi.org) | |
4 | |
5 This file is part of SàT website. | |
6 | |
7 SàT website is free software: you can redistribute it and/or modify | |
8 it under the terms of the GNU Affero General Public License as published by | |
9 the Free Software Foundation, either version 3 of the License, or | |
10 (at your option) any later version. | |
11 | |
12 Foobar is distributed in the hope that it will be useful, | |
13 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 GNU Affero General Public License for more details. | |
16 | |
17 You should have received a copy of the GNU Affero General Public License | |
18 along with Foobar. If not, see <http://www.gnu.org/licenses/>. | |
19 {% endcomment %} | |
20 | |
21 {% load i18n %} | |
22 {% load staticfiles %} | |
23 {% load utils %} | |
24 {% get_current_language as LANGUAGE_CODE %} | |
25 | |
26 <video class="{{style}}" | |
27 {% if width %}width="{{width}}"{% endif %} | |
28 {% if width %}height="{{height}}"{% endif %} | |
29 poster="{{ entry.poster }}" controls preload="none"> | |
30 <source src="{{ entry.paths|select_video_path }}" type='video/webm; codecs="vp8.0, vorbis"'> | |
31 {% for srclang, path in entry.subtitles.items %} | |
32 {% get_language_info for srclang as lang %} | |
33 <track label="{{lang.name_local}}" src="{{path}}" kind="subtitles" srclang="{{srclang}}" {% if srclang == LANGUAGE_CODE %} default{% endif %} /> | |
34 {% endfor %} | |
35 {% blocktrans with firefox="<a href=\"http://www.mozilla.org/\">Firefox</a>" %}Your browser doesn't manage the « video » tag, you should update, e.g. with the last {{ firefox }}.{% endblocktrans %} | |
36 </video> |