mifi/react-lottie-player

[Feature Request] Ability to configure quality

TheCatLady opened this issue · 4 comments

Would be great to support configuration of the lottie player quality for improved performance. 😺

https://github.com/airbnb/lottie-web/wiki/Usage#global-methods

lottie.setQuality() -- default 'high', set 'high','medium','low', or a number > 1 to improve player performance. In some animations as low as 2 won't show any difference.

mifi commented

hmm, it seems to be a global method, so it seems a bit wrong to be able to allow setting it on a react element

Hm, that is very true...

Can you provide any guidance on the recommended way to configure this setting when using this component? 🤔

mifi commented

I think just call this function on lottie-web directly, something like

import lottie from 'lottie-web'

lottie.setQuality(123)

@mifi Thanks! That's consistent with what I implemented on our site. Appreciate your reply, closing this now. 😄