diff options
author | Akshay <[email protected]> | 2024-09-01 22:54:20 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2024-09-01 22:54:20 +0100 |
commit | 9547d3d6019fa14f8330bf89a705025c18525c30 (patch) | |
tree | 41f3e02b88cc33787814311b5ee0726d5e6e2c64 /src/mixins | |
parent | 8b5db5e1954de865933fd4de003fdd21d57add4a (diff) |
support video preview and playback with hls streams
Diffstat (limited to 'src/mixins')
-rw-r--r-- | src/mixins/comment.pug | 3 | ||||
-rw-r--r-- | src/mixins/post.pug | 13 |
2 files changed, 10 insertions, 6 deletions
diff --git a/src/mixins/comment.pug b/src/mixins/comment.pug index ec01dad..545ee59 100644 --- a/src/mixins/comment.pug +++ b/src/mixins/comment.pug | |||
@@ -10,6 +10,9 @@ mixin comment(com, isfirst) | |||
10 | div.comment-info-container | 10 | div.comment-info-container |
11 | div.info-item u/#{data.author} | 11 | div.info-item u/#{data.author} |
12 | div.info-item ↑ #{fmtnum(data.ups)} | 12 | div.info-item ↑ #{fmtnum(data.ups)} |
13 | if data.collapsed_reason_code == "DELETED" | ||
14 | div.info-item | ||
15 | a(href=`https://undelete.pullpush.io${data.permalink}`) search on undelete | ||
13 | div.comment-body | 16 | div.comment-body |
14 | != data.body_html | 17 | != data.body_html |
15 | div.replies | 18 | div.replies |
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 | ||