[Feature Request] Browser never idle when a lottie animation runs
ChezMose opened this issue · 1 comments
What problem would this feature solve?
When a lottie animation runs, the browsers apparently is never idle.
Meaning the chat does not load unless the facade is clicked or hovered, which is an issue for our marketing team.
Describe the solution you’d like to see
I suggest adding a 'fixedPeriod' prop that would override the idlePeriod.
(and throw an error if both are provided)
Are you willing to work on implementing this solution?
Yes
Describe alternatives you’ve considered
Another solution is to add a 'ignoreRequestCallback' prop.
Easier to implement in the current code but probably too technical for users ;)
Additional context
No response
Code of Conduct
- I agree to follow this project’s Code of Conduct
Thanks for your notes @ChezMose, helpful to understand the situation.
We've also seen unexpected results with requestIdleCallback in #144, where the same situation arises… no idle, no widget.
idlePeriod
is "designed" to be an overall timeout/deadline for when a chat widget should be loaded. An appropriate fix here might be to alter the idlePeriod
so that there's always a deadline timeout, rather than waiting for a requestIdleCallback
that's never going to occur. Would you be willing to work on a solution that did that? Or do you have another idea?