aboutsummaryrefslogtreecommitdiff
path: root/static/posts.html
diff options
context:
space:
mode:
authorFChannel <=>2021-01-31 23:18:21 -0800
committerFChannel <=>2021-01-31 23:18:21 -0800
commit3bedb51f6a878253cfdf10ab89c67312fcd93886 (patch)
tree8e81ca4bda88d590ffdacbb01555a59b92ed0fd6 /static/posts.html
parent4a80553734f985dbbdf64b6c289a3985c0bc0880 (diff)
preload metadata of video to see first frame
Diffstat (limited to 'static/posts.html')
-rw-r--r--static/posts.html9
1 files changed, 4 insertions, 5 deletions
diff --git a/static/posts.html b/static/posts.html
index e146032..0e381ea 100644
--- a/static/posts.html
+++ b/static/posts.html
@@ -39,7 +39,7 @@
if(getMIMEType({{ (index .Attachment 0).MediaType }}) == "audio"){
var audio = document.createElement("audio")
audio.controls = 'controls'
- audio.preload = 'none'
+ audio.preload = 'metadata'
audio.src = '{{ (index .Attachment 0).Href }}'
audio.type = '{{ (index .Attachment 0).MediaType }}'
audio.style = "float: left; margin-right: 10px; margin-bottom: 10px; width: 250px;"
@@ -50,7 +50,7 @@
if(getMIMEType({{ (index .Attachment 0).MediaType }}) == "video"){
var video = document.createElement("video")
video.controls = 'controls'
- video.preload = 'none'
+ video.preload = 'metadata'
video.muted = 'muted'
video.src = '{{ (index .Attachment 0).Href }}'
video.type = '{{ (index .Attachment 0).MediaType }}'
@@ -105,7 +105,7 @@
if(getMIMEType({{ (index .Attachment 0).MediaType }}) == "audio"){
var audio = document.createElement("audio")
audio.controls = 'controls'
- audio.preload = 'none'
+ audio.preload = 'metadata'
audio.src = '{{ (index .Attachment 0).Href }}'
audio.type = '{{ (index .Attachment 0).MediaType }}'
audio.style = "float: left; margin-right: 10px; margin-bottom: 10px; width: 250px;"
@@ -116,7 +116,7 @@
if(getMIMEType({{ (index .Attachment 0).MediaType }}) == "video"){
var video = document.createElement("video")
video.controls = 'controls'
- video.preload = 'none'
+ video.preload = 'metadata'
video.muted = 'muted'
video.src = '{{ (index .Attachment 0).Href }}'
video.type = '{{ (index .Attachment 0).MediaType }}'
@@ -175,7 +175,6 @@
var content = document.getElementById("{{ .Id }}-content");
content.innerHTML = convertContent('{{$board.Actor}}', content.innerText, '{{ $opId }}')
-
</script>
{{ end }}
{{ end }}