add video subtitles and poster support
This commit is contained in:
parent
5c5febf40f
commit
98ec2bb929
1 changed files with 5 additions and 1 deletions
|
@ -67,8 +67,12 @@
|
||||||
<div class="video-container">
|
<div class="video-container">
|
||||||
<div class="video-player">
|
<div class="video-player">
|
||||||
<video preload="metadata" onclick="playthis(event)" onloadedmetadata="setup_video_metadata(event)"
|
<video preload="metadata" onclick="playthis(event)" onloadedmetadata="setup_video_metadata(event)"
|
||||||
ontimeupdate="setup_video_metadata(event)">
|
ontimeupdate="setup_video_metadata(event)"
|
||||||
|
{{if .Get "poster"}} poster='{{.Get "poster"}}'{{end}} >
|
||||||
<source src='{{.Site.BaseURL}}{{.Get "src" }}'>
|
<source src='{{.Site.BaseURL}}{{.Get "src" }}'>
|
||||||
|
{{if .Get "vtt"}}
|
||||||
|
<track label="English" kind="subtitles" src='{{.Get "vtt"}}' default>
|
||||||
|
{{end}}
|
||||||
</video>
|
</video>
|
||||||
<div class="video-controls">
|
<div class="video-controls">
|
||||||
<div onclick="toggle_video_play(event)" class="icon">
|
<div onclick="toggle_video_play(event)" class="icon">
|
||||||
|
|
Loading…
Reference in a new issue