summaryrefslogtreecommitdiffstats
path: root/templates/article.html
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@blos.sm>2024-07-17 10:04:13 +0100
committerLibravatar cel 🌸 <cel@blos.sm>2024-07-17 10:04:13 +0100
commit2476ed8bd64ea7335b6baf44ec1adbeb5169069c (patch)
treec926bca429ddb8605cc307df84237b188d24d393 /templates/article.html
parentfb76f6581f199504e66125dad3f5ca5a7d4c7db6 (diff)
downloadinfoculture.pub-2476ed8bd64ea7335b6baf44ec1adbeb5169069c.tar.gz
infoculture.pub-2476ed8bd64ea7335b6baf44ec1adbeb5169069c.tar.bz2
infoculture.pub-2476ed8bd64ea7335b6baf44ec1adbeb5169069c.zip
genericise video player
Diffstat (limited to 'templates/article.html')
-rw-r--r--templates/article.html12
1 files changed, 2 insertions, 10 deletions
diff --git a/templates/article.html b/templates/article.html
index 3de52e4..2aa24f2 100644
--- a/templates/article.html
+++ b/templates/article.html
@@ -3,15 +3,7 @@
<div class="thumbnail" style="height: 30vh;">$thumbnail$</div>
$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>
+ $partial("templates/video-player.html")$
$endif$
<div class="panel">
<section class="header">
@@ -39,4 +31,4 @@
$body$
</section>
</div>
-</article>
+</article> \ No newline at end of file