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

Support slide multiplex #8

Merged

Conversation

jossemarGT
Copy link
Contributor

@jossemarGT jossemarGT commented Jul 5, 2021

Background

I have used reveal.js for presentations, and I always have wished to not rely on having a big screen or any sort of projector to do so. The multiplex feature gives the presenter a little more flexibility by letting the audience follow the presentation on their own devices.

Description

I am adding all the required configurations and dependencies to enable reveal.js multiplex plugin.

When the --multiplex parameter is provided, revealgo adds the /master/ endpoint that renders exactly the same slides. Still, these ones can push their state to the server while others under / only follow them.

Heads up! This requires an old version of socket.io (v1.6.0) since that is the latest one that github.com/googollee/go-socket.io supports 🤷‍♂️ .

NOTE: This is a draft PR since I have a question for you in the commets section.

I am adding all the required configurations and dependencies to
enable reveal.js multiplex plugin.

When the --multiplex parameter is provided, revealgo adds the
/master/ endpoint that renders exactly the same slides, but these
ones are able to push their state to the server while the other
ones under / follow them.

Heads up! This requires an old version of socket.io (v1.6.0) since
that is the latest one that github.com/googollee/go-socket.io
supports.
param.Multiplex.IsMaster = true
http.Handle("/master/", http.StripPrefix("/master", contentHandler(param, http.FileServer(http.Dir(".")))))
http.Handle("/socketio/", assetsHandler("/assets/", http.FileServer(http.FS(socketiojs))))
http.Handle("/socket.io/", socketioServer)
Copy link
Contributor Author

@jossemarGT jossemarGT Jul 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking that the /socketio/ and /revealjs/ handlers could be merged as a single /assets/. But this will require to update all the paths in the slide.html template, which could be a considerable change. If you are alright with that I can do it.

@jossemarGT
Copy link
Contributor Author

Hi, it's me again. I am aware you might be busy, but I realize I might not have checked if you are interested on this feature on the first place. If that is the case, feel free to say "no thanks", I can keep my fork without any problem.

Stay safe o/

@yusukebe yusukebe marked this pull request as ready for review August 2, 2021 07:29
@yusukebe
Copy link
Owner

yusukebe commented Aug 2, 2021

Sorry for reply is so late. I tried using revealgo with multiplex feature by your PR's.
Feels very good. I'll merge it!

@yusukebe yusukebe closed this Aug 2, 2021
@yusukebe yusukebe reopened this Aug 2, 2021
@yusukebe yusukebe merged commit c13b88b into yusukebe:master Aug 2, 2021
@jossemarGT jossemarGT deleted the feature/support-slide-multiplex branch August 3, 2021 02:23
@jossemarGT
Copy link
Contributor Author

jossemarGT commented Aug 3, 2021

Hey @yusukebe I did not mean to rush you, I am sorry for that. But still, I thank you for accepting my contribution :octocat:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants