FormidableLabs / spectacle

A React-based library for creating sleek presentations using JSX syntax that gives you the ability to live demo your code.
https://commerce.nearform.com/open-source/spectacle/
MIT License
9.74k stars 691 forks source link

Multiplexing #889

Open boardfish opened 4 years ago

boardfish commented 4 years ago

I've put together a deck with an older version of Spectacle that I've got kicking around. I'm presenting in about three weeks.

I should be able to share my screen, but multiplexing as is available in reveal.js would make for a good backup in case I don't have permission.

I don't have a particularly convincing case for the feature, that aside, but if it's of interest I'd love to see it happen.

mikebarkmin commented 4 years ago

This would require to have a server component, which probably provides a web socket. Then there needs to be a main client (the speaker) which connects to the web socket by providing a secret speaker token. The main client would emit a slideChanged event. Each other client should just connect to the web socket and listen for the slideChanged events and act accordingly.

A slide changed event could just provide the slide number and the slide element number.

I have two questions for the maintainers:

  1. Is there some kind of plugin system for spectacle?
  2. Can you programmatically hook into the slide process and advance forwards or backwards by

If not, I would create a new component Multiplexer, which emits the events and processes received events. It should push the a new url based on the received slide and element to the history.

boardfish commented 4 years ago

Can you programmatically hook into the slide process and advance forwards or backwards

It's been a while since I've had a proper look, but I'm at least relatively sure that this is possible.