question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Autoplay and resizing browser while sliding stops play?

See original GitHub issue

The Swiper at http://plplondon.com/ is set up to autoplay: 5000, you can resize the browser when slides are static and it works fine, slides the next slide in on time.

However, resize the browser while slides are moving and the slide jumps to it’s final position and the autoplay seems to stop.

Is this correct? I can’t restart them manually by setting: <body onresize="mySwiper.reInit();mySwiper.resizeFix();mySwiper.startAutoplay()">

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DanDvoracekcommented, Jul 3, 2018

Yep, it looks like the issue is back, any idea how to restart the swiper after a resize event?

Tried something in those lines without success…

...
on: {
  resize: function () {
    // console.log('swiper resize!', this);  --> this is fired
    // this.updateSize(); --> seems to have no effect at all
    // this.updateSize(); --> seems to have no effect at all
    // this.updateSlides(); --> seems to have no effect at all
    // this.updateProgress(); --> seems to have no effect at all
    // this.updateSlidesClasses(); --> seems to have no effect at all
    slider.autoplay.start(); --> NOT RESTARTING
  }
...
}
0reactions
fritzmgcommented, Aug 2, 2017

This bug seems to happen again. I have a Swiper similar to this fiddle on a page: https://jsfiddle.net/u4oezjnz/1/

Whenever I resize the browser a lot, or if I switch to or from the responsive view mode in FireFox for example, the Swiper just stops autoplaying, with no possibility of resuming.

In the fiddle, just switch to the responsive view mode in FireFox for example to reproduce the problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Autoplay and resizing browser while sliding stops play? #574
However, resize the browser while slides are moving and the slide jumps to it's final position and the autoplay seems to stop.
Read more >
My swiper with Swiper.js stop autoplay after slide it with finger ...
While this is my initial swiper, and when I drag it with mouse or touch it with finger and then slided it, my...
Read more >
Captivate responsive courses will not auto-play on browsers
While SWF videos will continue to auto-play, HTML5 and other responsive courses will not auto-play. Auto Play option.
Read more >
Google Slides Audio and Video and Autoplay - YouTube
Learn to add audio and video files to your Google Slides and find the settings for autoplay for your ... Your browser can't...
Read more >
Video issues (autoplay not working, video player looks different)
This problem can happen, when at the slider autoplay the Stop on media option is turned on, and you enabled the Loop at...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found