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 jump parameter

See original GitHub issue

Feature request is related to

  • embla-carousel-autoplay

Is your feature request related to an issue?

There’s no way to utilize the jump parameter that embla.scrollNext() and embla.scrollPrev() accepts because these are invoked internally in the autoplay plugin.

Describe the solution you’d like

Add a boolean jump option that determines the default behaviour - if transitions should jump or not.

const options = { loop: true }
const embla = EmblaCarousel(emblaNode, options, Autoplay({ jump: true }))

Also allow to override the default jump behaviour using the autoplay API:

const embla = EmblaCarousel(emblaNode, options, Autoplay({ jump: true })) // autoplay will jump when it starts here

embla.plugins().autoplay.play(false) // <-- override defaultJump and start animating

Additional context

Feel free to join the conversation if you have anything to add.

Thanks

Thanks @th-km for the idea 💡:

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
davidjerlekecommented, Aug 31, 2022

Hi @th-km,

Sorry for the late reply, I’m just back from a trip.

Not a problem. We all have a life 😉.

I just released this feature with v7.0.2. Give it a go if you want and let me know if it works as expected. Additionally, if you have a moment, I would very much appreciate if you could check out the documentation additions and see if the explanations make sense to you or if you would like to amend something there:

  • Autoplay jump option
  • Autoplay jump parameter for play method

Thanks and cheers!

Best, David

1reaction
davidjerlekecommented, Sep 1, 2022

Happy to hear that @th-km 👍🏻. Thanks for confirming. Enjoy! Closing this issue as resolved then.

Read more comments on GitHub >

github_iconTop Results From Across the Web

YouTube Embedded Players and Player Parameters
For example, you can automatically play videos using the autoplay parameter or cause a video to play repeatedly using the loop parameter.
Read more >
Autoplay - Embla Carousel
Start autoplay. Set the jump parameter to true when you want autoplay to do instant slide transitions when advancing. Please note that providing...
Read more >
Youtube URL parameters for video: Autoplay, Start, End, Loop ...
Youtube URL parameters for video: Autoplay, Start, End, Loop (repeat), Subtitle & Co. – List · URL parameters: How it works · Turn...
Read more >
Autoplay Considerations - Brightcove Player Documentation
The Brightcove Player supports five possible values for autoplay. In the HTML5 spec, autoplay is a boolean attribute - it id either on...
Read more >
Autoplay parameter for Youtube · Issue #103 - GitHub
How can I pass a parameter to auto play youtube video? When I attach it to the url in href - it gets...
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