summaryrefslogtreecommitdiff
path: root/templates/embed.html
diff options
context:
space:
mode:
authorJulian Hurst <julian.hurst92@gmail.com>2021-07-24 10:40:39 +0200
committerJulian Hurst <julian.hurst92@gmail.com>2021-07-24 10:40:39 +0200
commitae9cc2ac49b976992f2e924ef8d30bd540ce2ec0 (patch)
tree1f379c05670389e8a788c62a9853ade06ed3442b /templates/embed.html
parent513b1f4d83d8267f9b8c7299822c40e9d4d77196 (diff)
downloadgrimtube-ae9cc2ac49b976992f2e924ef8d30bd540ce2ec0.tar.gz
Add support for dlsrv streaming
Diffstat (limited to 'templates/embed.html')
-rw-r--r--templates/embed.html11
1 files changed, 10 insertions, 1 deletions
diff --git a/templates/embed.html b/templates/embed.html
index ff372ab..a9d9d68 100644
--- a/templates/embed.html
+++ b/templates/embed.html
@@ -1,4 +1,13 @@
{{define "title"}}Index{{end}}
{{define "content"}}
- <iframe width="100%" height="100%" src="https://www.youtube-nocookie.com/embed/{{.}}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
+ {{if ne .Dlsrv ""}}
+ <div>
+ <video width="100%" controls>
+ <source src="{{.Dlsrv}}{{.Url}}">
+ No support for html5 video
+ </video>
+ </div>
+ {{else}}
+ <iframe width="100%" height="100%" src="https://www.youtube-nocookie.com/embed/{{.Id}}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
+ {{end}}
{{end}}