From 495083aba171775730277680e9fafb16ca1464fe Mon Sep 17 00:00:00 2001 From: Harvey Zack Date: Fri, 31 May 2024 10:20:01 +0800 Subject: [PATCH] Update webtorrent.js --- docs/assets/example/webtorrent.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/assets/example/webtorrent.js b/docs/assets/example/webtorrent.js index a51043dd8..cd8ea3622 100644 --- a/docs/assets/example/webtorrent.js +++ b/docs/assets/example/webtorrent.js @@ -6,8 +6,7 @@ async function playTorrent(video, url, art) { if (art.torrent) art.torrent.destroy(); art.torrent = new WebTorrent(); - const registration = await navigator.serviceWorker.register('/webtorrent.sw.min.js', { scope: '/' }); - console.log('ServiceWorker registration successful with scope: ', registration.scope); + await navigator.serviceWorker.register('/webtorrent.sw.min.js'); art.torrent.loadWorker(navigator.serviceWorker.controller); art.torrent.add(url, (torrent) => {