diff options
author | cel 🌸 <cel@blos.sm> | 2024-07-16 13:12:33 +0100 |
---|---|---|
committer | cel 🌸 <cel@blos.sm> | 2024-07-16 13:12:33 +0100 |
commit | fd0ea710395904e1b4cf5f22fd17af13db43ce5f (patch) | |
tree | c694efa675d3ad1daab3b1d9cfea737a805f1977 /templates/load-webtorrent.html | |
parent | e5e763f1d7d473b22d8c2e7f4a0058ada7832c24 (diff) | |
download | infoculture.pub-fd0ea710395904e1b4cf5f22fd17af13db43ce5f.tar.gz infoculture.pub-fd0ea710395904e1b4cf5f22fd17af13db43ce5f.tar.bz2 infoculture.pub-fd0ea710395904e1b4cf5f22fd17af13db43ce5f.zip |
webtorrent and teaser support
Diffstat (limited to 'templates/load-webtorrent.html')
-rw-r--r-- | templates/load-webtorrent.html | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/templates/load-webtorrent.html b/templates/load-webtorrent.html new file mode 100644 index 0000000..0d7347f --- /dev/null +++ b/templates/load-webtorrent.html @@ -0,0 +1,9 @@ +<script type='module'> + import WebTorrent from '/scripts/webtorrent.min.js'; + + window.torrentClient = new WebTorrent(); + + navigator.serviceWorker.register('/sw.min.js'); + const controller = await navigator.serviceWorker.ready; + window.torrentClient.createServer({controller}); +</script> |