Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: improve document about settings #248

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JounQin
Copy link

@JounQin JounQin commented Sep 19, 2021

close #242
close #247

@JounQin
Copy link
Author

JounQin commented Sep 19, 2021

cc @jimmywarting

I'm not a native English speaker, so maybe it could be better expressed.

@jimmywarting
Copy link
Owner

I'm not a native English speaker

Ditto :)

@@ -105,13 +105,14 @@ Note that when using insecure context StreamSaver will navigate to the download

# Configuration

By default, `https://jimmywarting.github.io/StreamSaver.js/mitm.html?version=2.0.0` will be used to create the iframe in secure context. But it could be unavailable when using Firefox or an environment where `github.io` can not be accessed, then you need to config a custom `mitm.html` by yourself.

Copy link
Owner

@jimmywarting jimmywarting Sep 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not believe it is a specific Firefox issue?

I think it's more about 3th party cookie restrictions

you see, if you disable 3th party cookies in chrome or in safari then jimmywarting.github.io/StreamSaver.js/mitm.html won't work either...

It's should say something like:

StreamSaver uses a 3th party service to install a service worker on an external domain (hidden in a iframe). This can sometimes be restricted by disabling 3th party cookies in your browser. To get around this issue it's best to self-host the service worker and replace streamSaver.mitm to your own domain.

Toughts?
It may also be a problem in incognito mode where things are more private

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems #242 is not mentioned in the new sentence?

Copy link
Owner

@jimmywarting jimmywarting Sep 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated, but... My https://github.com/jimmywarting/native-file-system-adapter works a bit differently... same concept doe... but it communicates with service workers directly without a mitm or any hidden iframes or will use the native file system access window.showSaveFilePicker

you are more required to self host the service worker yourself

Copy link
Owner

@jimmywarting jimmywarting Sep 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems #242 is not mentioned in the new sentence?

???

fyi, it could also be a restriction with CSP...

should definitely put up a guide of how to set it up more properly, a setting for communicating with service worker directly instead of via a iframe could also be preferred.

Copy link
Author

@JounQin JounQin Sep 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean my words or an environment where `github.io` can not be accessed

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a setting for communicating with service worker directly instead of via a iframe could also be preferred.

I didn't know we can skip mimt even. 😂

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will use the native file system access window.showSaveFilePicker

Yeah, I'm also doing this myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lazy loaded TransformStream polyfill is not supported Any instruction on how to self host mitm?
2 participants