aboutsummaryrefslogtreecommitdiff
path: root/src/mixins/post.pug
diff options
context:
space:
mode:
authorAkshay <[email protected]>2024-09-01 22:54:20 +0100
committerAkshay <[email protected]>2024-09-01 22:54:20 +0100
commit9547d3d6019fa14f8330bf89a705025c18525c30 (patch)
tree41f3e02b88cc33787814311b5ee0726d5e6e2c64 /src/mixins/post.pug
parent8b5db5e1954de865933fd4de003fdd21d57add4a (diff)
support video preview and playback with hls streams
Diffstat (limited to 'src/mixins/post.pug')
-rw-r--r--src/mixins/post.pug13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mixins/post.pug b/src/mixins/post.pug
index f5819d4..cbe2365 100644
--- a/src/mixins/post.pug
+++ b/src/mixins/post.pug
@@ -4,7 +4,8 @@ mixin post(p)
4 div.post-container 4 div.post-container
5 div.post-text 5 div.post-text
6 div.title-container 6 div.title-container
7 != p.title 7 a(href=`/comments/${p.id}`)
8 != p.title
8 span.domain (#{p.domain}) 9 span.domain (#{p.domain})
9 div.info-container 10 div.info-container
10 div.info-item ↑ #{fmtnum(p.ups)} 11 div.info-item ↑ #{fmtnum(p.ups)}
@@ -17,9 +18,9 @@ mixin post(p)
17 if p.post_hint == "image" || p.post_hint == "link" 18 if p.post_hint == "image" || p.post_hint == "link"
18 if p.thumbnail && p.thumbnail != "self" || p.thumbnail != "default" 19 if p.thumbnail && p.thumbnail != "self" || p.thumbnail != "default"
19 a(href=p.url) 20 a(href=p.url)
20 img(src=p.thumbnail width='100px') 21 img(src=p.thumbnail width='100px' height='100px')
21 else if p.post_hint == "hosted:video" 22 else if p.post_hint == "hosted:video"
22 - var url = p.secure_media.reddit_video.fallback_url 23 - var url = p.secure_media.reddit_video.dash_url
23 a(href=url) 24 a(href=url)
24 video(src=url height='100px') 25 video(src=url controls data-dashjs-player="" width='100px' height='100px')
25 26