diff options
author | 2024-07-17 10:04:13 +0100 | |
---|---|---|
committer | 2024-07-17 10:04:13 +0100 | |
commit | 2476ed8bd64ea7335b6baf44ec1adbeb5169069c (patch) | |
tree | c926bca429ddb8605cc307df84237b188d24d393 /templates/thumbs.html | |
parent | fb76f6581f199504e66125dad3f5ca5a7d4c7db6 (diff) | |
download | infoculture.pub-2476ed8bd64ea7335b6baf44ec1adbeb5169069c.tar.gz infoculture.pub-2476ed8bd64ea7335b6baf44ec1adbeb5169069c.tar.bz2 infoculture.pub-2476ed8bd64ea7335b6baf44ec1adbeb5169069c.zip |
genericise video player
Diffstat (limited to 'templates/thumbs.html')
-rw-r--r-- | templates/thumbs.html | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/templates/thumbs.html b/templates/thumbs.html index 6070c23..cadbbc7 100644 --- a/templates/thumbs.html +++ b/templates/thumbs.html @@ -6,15 +6,7 @@ <br> $endif$ $if(torrent)$ - <video controls class="thumbnail" id="media-$id$" style="height: 20vh;"></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="thumb-title"> <a href="$url$"> @@ -40,4 +32,4 @@ $endif$ </div> $endfor$ -</div>
\ No newline at end of file +</div> |