Open OmerDavidson opened 2 years ago
I guess you no longer pay attention to this issue,just show my solution for others who may encounter this condition if you are using vue, you may use “register-service-worker” , you just need to copy mitm.html and sw.js to your public folder and modify mitm.html
.getRegistration('./')
.then(swReg => {
if (swReg.active.scriptURL.includes('sw')) {
return swReg;
}
return navigator.serviceWorker.register('sw.js', { scope: './' });
})
i guess before code getRegistration('./').then(swReg => { return swReg || navigator.serviceWorker.register('sw.js', { scope: './' })
will always return vue default register-service-worker
Hi, I am trying out the example from the readme and I just can't for the life of me get it to work offline. I am not seeing any popup or any download starting.
I am using http (but i am on localhost so there is secure context for now). I am hosting mitm on my own. I put mitm.html and sw.js on my public folder. I also registered the service worker.
This is the code:
both 'start' and 'end' are being printed.
streamsaver version: 2.0.6 Chrome version: 94