summaryrefslogblamecommitdiffstats
path: root/templates/load-webtorrent.html
blob: f63aa41f1ea2e462d47065444a3c0d02a56ba9a4 (plain) (tree)
1
2
3
4
5
6
7
8
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>