rcaferati / react-awesome-slider

React content transition slider. Awesome Slider is a 60fps, light weight, performant component that renders an animated set of production ready UI general purpose sliders with fullpage transition support for NextJS and GatsbyJS. 🖥️ 📱
https://fullpage.caferati.me
MIT License
2.94k stars 296 forks source link

Autoplay does not work and how to turn off Bar #163

Open hutber opened 3 years ago

hutber commented 3 years ago

Hey there, thank you first for writing this package! v.4.1.0

It seems that autoplay and the bar are getting stuck, I would also like to the turn countdown bar off too: image

Code:

              <AutoplaySlider
                bullets={false}
                organicArrows={false}
                play={true}
                cancelOnInteraction={false} // should stop playing on user interaction
                interval={6000}
              >
                {images.map(img => (
                  <div data-src={img} key={img} />
                ))}
              </AutoplaySlider>

output html

image

I hope this helps.

tong-anupan commented 3 years ago

Please try:

const AutoplaySlider = withAutoplay(AwesomeSlider);

must be inside the render() method, I put it inside render() is working.

christarpher commented 3 years ago

I seem to be having the same issue, and it seems to mostly stem from having more than one autoplay slider on a page. Further, it seems to not exhibit the issue for me when I'm developing and only rears its head after being built and deployed. Take this all with a grain of salt, but I haven't figured out a way to solve this yet, and I did try putting the AutoPlaySlider in the render method.