g787543/infinite-react-carousel

autoplay seems to be stopped at some point

Closed this issue · 5 comments

First of all, thanks for this lib ! you did an awesome job :)

Describe the bug
I'm using your lib just to have an infinite autoplay slider.
The timer seems to be frozen sometimes at first app render (I have to refresh to make it start).
I have the same issue when I switch on another tab, it freezes where it was just before (I usually see the end of the scroll animation and then never switch to the next slide).
I set up a srcollSpeed to 8000

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://storybook-95-stoomlink-smartdisplays-frontend.nextmoov-ops.now.sh/?path=/story/disturbscreen--default'
  2. Maybe It will work at first render, maybe not.
  3. Try to switch to another tab and then come back to that one

Expected behavior
It should just start and never stops while the app is running, maybe it can restart to the first slide when you switch on another browser tab.

Desktop (please complete the following information):

  • OS: macOS Mojave 10.14.6
  • Browser: Chrome
  • Version: 79.0.3945.117

NOTE: This is still a WIP, and custom styled

Hi, @ferrarisMat

Thank you. I am pleased you like it and please give me more time to fix this problem.

Hi, @ferrarisMat

Did you set pauseOnHover to false?
if not, autoplay may stop when mouse hover on carousel

Thanks @g787543 !
I tried to set pauseOnHover={false} it seems to be less buggy when I switch tabs, but unfortunately I still have some issues at first render.

Hi, @ferrarisMat

I already pushed the new version on npm, please try again, thank you.

Hi, @ferrarisMat

I already pushed the new version on npm, please try again, thank you.

Wow ! that was fast, thank you !
I just tested and I works as expected now ✌🏻