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

Autoplay Removed? #861

Closed
beautifulcode opened this issue Mar 8, 2020 · 9 comments
Closed

Autoplay Removed? #861

beautifulcode opened this issue Mar 8, 2020 · 9 comments
Labels
Feature Request Request for or introduction of new functionality

Comments

@beautifulcode
Copy link

Question

Was wondering if autoplay is still possible with the v6? If not, is it planned or is there a suggested workaround?

Background Info/Attempts

Upgraded for the background image support but seem to have lost the autoplay ability.

@kale-stew kale-stew added the Feature Request Request for or introduction of new functionality label Mar 9, 2020
@kale-stew
Copy link
Contributor

Thanks for opening this issue, @beautifulcode -- definitely an oversight on our part for the rewrite, but I've flagged it as a Feature Request so we can fast track a PR; autoplay is definitely a feature we want to bring back.

@beautifulcode
Copy link
Author

Thank you @kale-stew good to know!

I know this is open source, and I sincerely appreciate the effort put in but is there any anticipated timeline at all?

If not, which again I totally understand, that would be good to know, as I'm intending to use this for a near-term project. Otherwise, if I come up with something, I'll fork and submit a PR.

@kale-stew
Copy link
Contributor

Fair question, @beautifulcode - unless someone else swoops in, I would be taking care of this feature in my free time, so I might say a week? I'll have some time to work on OSS tomorrow evening & over the weekend. How near term of a project are we talking?

@beautifulcode
Copy link
Author

@kale-stew I'll be testing it out (non-autoplay) on a TV display tomorrow. :D A week would be amazing but please don't worry if you can't get to it that quick. Thanks again!

@cerebroo
Copy link

cerebroo commented Apr 19, 2020

@kale-stew - is it currently possible to programatically change the slides? That can help as a work around for autoplay for now and I actually have another use case as well for it.

update: Never mind. I got it working by triggering keydown event. Thanks

@kale-stew
Copy link
Contributor

@cerebroo -- apologies for my lack of a response over the weekend! It sounds like you've solved your issue using the keydown event, but to answer your question: You can programatically change the slides, using the MSG_SLIDE_STATE_CHANGE action exposed by our usePresentation hook (see an example of this usage here, in the Deck component).

Hope this helps. 🙂 I've made some headway on the autoplay feature but got sidetracked with some higher-priority bugs that have surfaced. I would be interested to hear about your other use case if you'd like to share, though!

@adambutler
Copy link

@kale-stew I'm facing the same issue and implementing a key event seems a bit of a hack.

It's unclear to me how as a consumer of spectacle I would go about using the MSG_SLIDE_STATE_CHANGE action for a number of reasons.

  1. The hooks aren't exposed for use in the library's main export. I presume I'd have to import these by path into the node_modules directory?
import useDeck from "../node_modules/spectacle/lib/hooks/use-deck";
  1. To dispatch MSG_SLIDE_STATE_CHANGE depends on me having the state to construct the payload of the action.

I'm probably totally misunderstanding how to approach this. It would be really appreciated if you could point me in the right direction of how to programmatically change slides as a consumer of this library.

Thanks for all your hard work on it.

@chardskarth
Copy link

chardskarth commented Sep 21, 2020

I wanted to do something similar; programmatic way to change slides.

I achieved this through exporting DeckContext and doing const { goToSlide } = useContext(DeckContext).

Gonna stick with this hacky solution until this feature request gets resolved 😉. Still, awesome work!

@fritz-c
Copy link
Contributor

fritz-c commented Sep 19, 2022

The props autoPlay and autoPlayInterval exist in the most recent versions.

Demo:
https://codesandbox.io/s/autoplay-demo-spectacle-4vwh1v

As for programmatic navigation, please make a separate feature request issue to cover that.

@fritz-c fritz-c closed this as completed Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Request for or introduction of new functionality
Projects
None yet
Development

No branches or pull requests

6 participants