Show language-dependent video for selected languages

Currently, this is only valid for DE but it can be easily extended
lektura
max.mehl 2017-09-19 12:27:42 +02:00
parent df3a1dc29d
commit 85336ead0c
No known key found for this signature in database
GPG Key ID: 2704E4AB371E2E92
1 changed files with 8 additions and 4 deletions

View File

@ -1,9 +1,13 @@
{{ $.Scratch.Set "langext" "" }}
{{ if and (or (eq .Lang "de") ) }}
{{ $.Scratch.Add "langext" (printf "_%s" .Lang) }}
{{ end }}
<center> <center>
<video controls="controls" poster="/img/poster.jpg" crossorigin="crossorigin" width="100%"> <video controls="controls" poster="/img/poster.jpg" crossorigin="crossorigin" width="100%">
<source src="https://download.fsfe.org/videos/pmpc/pmpc_desktop.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' media="screen and (min-device-width:1000px)" /> <source src="https://download.fsfe.org/videos/pmpc/pmpc{{$.Scratch.Get "langext"}}_desktop.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' media="screen and (min-device-width:1000px)" />
<source src="https://download.fsfe.org/videos/pmpc/pmpc_desktop.webm" type='video/webm; codecs="vp9, opus"' media="screen and (min-device-width:1000px)" /> <source src="https://download.fsfe.org/videos/pmpc/pmpc{{$.Scratch.Get "langext"}}_desktop.webm" type='video/webm; codecs="vp9, opus"' media="screen and (min-device-width:1000px)" />
<source src="https://download.fsfe.org/videos/pmpc/pmpc_mobile.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' media="screen and (max-device-width:999px)" /> <source src="https://download.fsfe.org/videos/pmpc/pmpc{{$.Scratch.Get "langext"}}_mobile.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' media="screen and (max-device-width:999px)" />
<source src="https://download.fsfe.org/videos/pmpc/pmpc_mobile.webm" type='video/webm; codecs="vp9, opus"' media="screen and (max-device-width:999px)" /> <source src="https://download.fsfe.org/videos/pmpc/pmpc{{$.Scratch.Get "langext"}}_mobile.webm" type='video/webm; codecs="vp9, opus"' media="screen and (max-device-width:999px)" />
<track src="https://publiccode.eu/video-subs/webvtt/pmpc_en.vtt" kind="subtitle" srclang="en" label="English" default="default"> <track src="https://publiccode.eu/video-subs/webvtt/pmpc_en.vtt" kind="subtitle" srclang="en" label="English" default="default">
<track src="https://publiccode.eu/video-subs/webvtt/pmpc_de.vtt" kind="subtitle" srclang="de" label="Deutsch"> <track src="https://publiccode.eu/video-subs/webvtt/pmpc_de.vtt" kind="subtitle" srclang="de" label="Deutsch">