Mercurial > sat_legacy_website
view 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 |
line wrap: on
line source
{% comment %} SàT website: Salut à Toi's presentation website Copyright (C) 2012 Jérôme Poisson (goffi@goffi.org) This file is part of SàT website. SàT website is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Foobar is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with Foobar. If not, see <http://www.gnu.org/licenses/>. {% endcomment %} {% load i18n %} {% load staticfiles %} {% load utils %} {% get_current_language as LANGUAGE_CODE %} <video class="{{style}}" {% if width %}width="{{width}}"{% endif %} {% if width %}height="{{height}}"{% endif %} poster="{{ entry.poster }}" controls preload="none"> <source src="{{ entry.paths|select_video_path }}" type='video/webm; codecs="vp8.0, vorbis"'> {% for srclang, path in entry.subtitles.items %} {% get_language_info for srclang as lang %} <track label="{{lang.name_local}}" src="{{path}}" kind="subtitles" srclang="{{srclang}}" {% if srclang == LANGUAGE_CODE %} default{% endif %} /> {% endfor %} {% 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 %} </video>