summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJames Mills <prologic@shortcircuit.net.au>2020-03-28 15:59:16 +1000
committerJames Mills <prologic@shortcircuit.net.au>2020-03-28 15:59:16 +1000
commitd21c06c4651e2ac6eebca25d94ff2855618a94d8 (patch)
tree220fd462622bfea790f17e385d4bb4e2431fccab /templates
parentca5969379ac4ef81f251fd9184d1196e34b1f3b5 (diff)
Add backend support for serving lower quality videos (if available)
Diffstat (limited to 'templates')
-rw-r--r--templates/index.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/index.html b/templates/index.html
index aea20cb..5d8cd18 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -2,7 +2,9 @@
{{ $playing := .Playing }}
<div id="player">
{{ if $playing.ID }}
- <video id="video" controls preload="metadata" poster="/t/{{ $playing.ID}}" src="/v/{{ $playing.ID }}.mp4" type="video/mp4"></video>
+ <video id="video" controls preload="metadata" poster="/t/{{ $playing.ID}}">
+ <source src="/v/{{ $playing.ID }}.mp4?quality={{ $.Quality }}" type="video/mp4" />
+ </video>
<h1>{{ $playing.Title }}</h1>
<h2>{{ $playing.Views }} views • {{ $playing.Modified }}<br />{{ $playing.Size | bytes }}</h2>
<p>{{ $playing.Description }}</p>