Skip to content
This repository has been archived by the owner on Mar 14, 2019. It is now read-only.

[1.7.0] Preload file data on the client #215

Open
raix opened this issue Mar 26, 2014 · 5 comments
Open

[1.7.0] Preload file data on the client #215

raix opened this issue Mar 26, 2014 · 5 comments

Comments

@raix
Copy link

raix commented Mar 26, 2014

For now I don't think we will add special support for this - ideally this feature could be ui helpers - these need to be destroyed properly when not used so we can keep track of memory. For now there are jquery libraries solving this https://github.com/luis-almeida/unveil

The code @aldeed shows in #206 (comment) - is ways to handle this - Ideally the data should streamed on the client-side as long as possible and be stored in blob. We can make dataUrl object references to blobs, this saves memory, but again we would have to know when to let go of the memory again eg. as a ui helper or track the subscriptions.

@raix
Copy link
Author

raix commented Mar 26, 2014

@lingz and @aldeed Lets move the comments into this issue

@lingz
Copy link

lingz commented Mar 26, 2014

Also, another nice idea with images might be to do something along the lines of PreloadJS, having the browser fetch the URL via XHR, and letting the browsercache handle the rest.

https://github.com/CreateJS/PreloadJS/

We can actually already implement this but it's very ugly. Basically it would be something like a watch on the Images collection, and whenever one is published, it would fetch it's url. Something more elegant that autofetches new images when they become available would be much more ideal.

@raix
Copy link
Author

raix commented Mar 26, 2014

At somepoint we will support local client-side files, i think the preload store is part of that pattern. I did prototype a local store in a private repo "cloudfs", it hold the files locally and used local files until uploaded, then switched reactivly to server url. It's our way of thinking latency compencation. So a Big topic post 1.0.0 but ok to start the dialog

@raix
Copy link
Author

raix commented Mar 26, 2014

I've been thinking about a ui handler that fades in images when loaded, like ios does natively

@raix raix added this to the 1.7.0 Client-side storage milestone Mar 27, 2014
@raix raix changed the title Preload file data on the client [1.7.0] Preload file data on the client Mar 27, 2014
@Sivli-Embir
Copy link

+1 for this. I am currently storing SVG files directly in a normal collection and using meteor's pub/sub to 'cache' them in advance. I need to add audio soon and this solution would be a fantastic alternative.

It would also be wonderful to be able to have them optionally go to local storage, since in my case I reuse them a lot.

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

No branches or pull requests

3 participants