diff options
Diffstat (limited to 'templates/thumbs.html')
-rw-r--r-- | templates/thumbs.html | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/templates/thumbs.html b/templates/thumbs.html index 91cfd74..3fcc6f7 100644 --- a/templates/thumbs.html +++ b/templates/thumbs.html @@ -5,6 +5,17 @@ <div class="thumbnail" style="height: 25vh">$thumbnail$</div> <br> $endif$ + $if(torrent)$ + <video controls class="thumbnail" id="media-$id$" style="height: 30vh;"></video> + <script type='module'> + const torrentId = '$torrent$'; + const player = document.querySelector('#media-$id$'); + window.torrentClient.add(torrentId, torrent => { + const file = torrent.files.find(file => file.name.endsWith('.mp4')); + file.streamTo(player); + }); + </script> + $endif$ <div class="thumb-title"> <a href="$url$"> <h2>$title$</h2> @@ -22,6 +33,11 @@ $subtitle$ </div> $endif$ + $if(teaser)$ + <div class="thumb-teaser"> + $teaser$<a href="$url$">read more...</a> + </div> + $endif$ </div> $endfor$ -</div>
\ No newline at end of file +</div> |