Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose the state for autoplay and events to listen to it #619

Closed
1 task done
Tracked by #321
davidjerleke opened this issue Nov 3, 2023 · 0 comments · Fixed by #620
Closed
1 task done
Tracked by #321

Expose the state for autoplay and events to listen to it #619

davidjerleke opened this issue Nov 3, 2023 · 0 comments · Fixed by #620
Labels
feature request New feature or request resolved This issue is resolved

Comments

@davidjerleke
Copy link
Owner

davidjerleke commented Nov 3, 2023

👉 Credit goes to @kdzone. Discussed in #308.

Feature request is related to

  • embla-carousel-autoplay

Is your feature request related to an issue

Originally posted by kdzone April 30, 2022
Playback can be stopped via stopOnMouseEnter and other internal events.
How to change the styles of my play button?

Describe the solution you'd like

Originally posted by kdzone April 30, 2022

I suggest making a state for autoplay and an event to change it.

Specification:

emblaApi.on('autoplay:play', () => console.log('play'))
emblaApi.on('autoplay:stop', () => console.log('stop'))

emblaApi.plugins().autoplay.isPlaying() // --> boolean
@davidjerleke davidjerleke added the feature request New feature or request label Nov 3, 2023
@davidjerleke davidjerleke mentioned this issue Nov 3, 2023
37 tasks
davidjerleke added a commit that referenced this issue Nov 3, 2023
@davidjerleke davidjerleke changed the title Expose the state for autoplay and an events to listen to it Expose the state for autoplay and events to listen to it Nov 5, 2023
davidjerleke added a commit that referenced this issue Nov 10, 2023
davidjerleke added a commit that referenced this issue Nov 10, 2023
Expose the state for autoplay and events to listen to it
@davidjerleke davidjerleke added the resolved This issue is resolved label Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request resolved This issue is resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant