Closed jrgarou closed 6 years ago
To avoid the situation above I've installed the bLazy to show image only when it's loaded. More about it: https://github.com/dinbror/blazy/
Create a new instance: https://github.com/Paratii-Video/paratii-player/blob/3bf7d431ac0eca449fb8d29f860d87c4e9442dd7/imports/ui/pages/playlists/playlists.js#L21-L25
... then revalidate when is need it https://github.com/Paratii-Video/paratii-player/blob/3bf7d431ac0eca449fb8d29f860d87c4e9442dd7/imports/ui/pages/playlists/playlists.js#L50
what does that "blazy" resolve exactly? (I'm asking because we have very long load times, and so I am bt wary of installing yet another new library)
@jellegerbrandy
In my local, images are taking time to load. In playlist page (e.g. /playlists/2
) all thumb images are load, not just the visible images in pagination. So the firsts images could take too long time to load, and keep loading when page is changed.
For that I decided to use the bLazy, to control this load and how images are displayed (I didn't setup to load in pagination in the commit). But the slow loading is only in my local. On the staging the image loading is pretty good.
Main loader
Based on @pedrocasa reference.
Structure
mainLoader.html mainLoader.js
The
{{> mainLoader}}
it's already in the body. The.main-app
receive theshow-main-loader
class from showMainLoaderClass helper whenSession.get('showMainLoader', true)
Usage
Session.set('mainLoaderText', 'your text here')
to change the loader textSession.set('showMainLoader', true)
to show the loaderSession.set('showMainLoader', null)
to hide the loader