Closed crapthings closed 3 years ago
I'm having the same problem. are you using react?
the protocol can never be anything else other than https b/c service worker is a power feature and requires the site to be secure (https), so you could as well hardcode the protocol to https also
only time it works with http is if the site is localhost or explicit whitelisted
only time it works with http is if the site is localhost or explicit whitelisted
mitm.html can be used from a minimal Chrome extension by specifying "web_accessible_resources"
in manifest.json.
Oh, right one more thing that is not how you are suppose to configure the mitm within createWriteStream option... you only do it once
import streamSaver from 'streamsaver'
streamSaver.mitm = 'https://cube-public.oss-cn-beijing.aliyuncs.com/cube-cdn/public/mitm.v2.0.0.html'
https://github.com/jimmywarting/StreamSaver.js/blob/master/StreamSaver.js#L31
mitm: 'https://jimmywarting.github.io/StreamSaver.js/mitm.html?version=2.0.0'