Autoplay option does not work in Safari
See original GitHub issueReproduce step:
- Open a page with a Swiper with autoplaying.
- Open that page in a second tab.
- Play around with the second tab (click on the
nextButton
orprevButton
). - Go back to the first tab and the autoplay does not work anymore, neither the
nextButton
norprevButton
works. However, clicking on the pagination still works.
My swiper options are:
new Swiper('.selector',
{ autoplay: 3000,
pagination: '.swiper-pagination',
nextButton: '.swiper__next-btn',
prevButton: '.swiper__prev-btn' }
After investigating, here is what I could find:
s.animating
is true when calling functions.slideNext()
s.animating
is true because it is set to true when calling functions.slideTo()
(at the end of the function).s.animating
is intended to set back to false in thetransitionEnd
event’s callback. However, the callback fortransitionEnd
is not called when switching tab in Safari.
Additional info:
- Swiper version:
3.3.1
- Safari version:
9.0.3 (10601.4.4)
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Video auto play is not working in Safari and Chrome ...
I had this issue in Safari 11 where a background video (no audio) wouldn't play automatically. Adding muted and autoplay did the trick....
Read more >Safari "Allow all auto-play" not working on Youtube playlist.
Open Youtube > Click Safari > Settings for this website > Change 'Auto-Play' setting to Allow always. Should work!. Show more Less. Reply ......
Read more >[Video Autoplay] not working in Safari 15.5
Running in low power mode -> Full charged and plugged · 'Never auto-play' set in the Website tab of Safari's Preferences set on...
Read more >HOW-TO: Enable Autoplay for Safari Users
1. Open Safari and navigate to Safari > Settings for This Website in the menu bar. 2. This will bring up a window...
Read more >Fix HTML Video Autoplay Not Working
You've added a video tag to your website, set the video source, but it won't autoplay. Let's fix it.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
My temporary solution is:
Issue is closed because of outdated/irrelevant/not actual/needed more information/inactivity.
If this issue is still actual and reproducible for latest version of Swiper, please create new issue and fill the issue template correctly: