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

Usable in Web Workers #4

Open
ebidel opened this issue Dec 27, 2011 · 4 comments
Open

Usable in Web Workers #4

ebidel opened this issue Dec 27, 2011 · 4 comments

Comments

@ebidel
Copy link
Owner

ebidel commented Dec 27, 2011

I believe the lib can be used, but making it more friendly for workers
might be worthwhile. There's a synchronous API.

@ebidel
Copy link
Owner Author

ebidel commented Mar 29, 2012

Also, I don't believe webkitStorageInfo is available in a worker, so there's no way to request
quota for the first time when using persistent storage.

@mwise
Copy link

mwise commented Jan 8, 2014

Hey Eric,

Have you done any more digging on using filer.js in a web worker context? We're using filer.js to store audio samples and are always looking for opportunities to pull things out of the main process. I see that this is is an old issue, so I figured I'd reach out to you before looking into it too deeply. If you have any new insights or recommendations, I'd be happy to dig into this approach a bit.

--oops, just saw your 'Dealing with Quota' section on http://www.html5rocks.com/en/tutorials/file/filesystem-sync/ . Would this approach be something you'd think about rolling into filer.js? If so and we can get it working, I can take a stab at putting together a PR for it.

This library and your articles on Filesystem API are great - thanks for putting them out there!

@ebidel
Copy link
Owner Author

ebidel commented Jan 8, 2014

Unfortunately I haven't. I believe things should, but haven't spent the time to properly test. The one issue (noted above) is that you'd have to do quota checks outside of the worker...unless that API was added recently.

If filer.js doesn't work out of the box, I'd imagine only a few small tweaks would be required.

@mwise
Copy link

mwise commented Jan 8, 2014

Ok awesome, thanks. I just realized that this issue was probably referring to filer.js being imported wholesale into a worker, so I'm not sure that extending it to make the quota call outside the worker will fit in the library's scope. Thanks for the quick reply - I'll report back if I find anything interesting.

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

No branches or pull requests

2 participants