Zulko / eagle.js

A hackable slideshow framework built with Vue.js
https://zulko.github.io/eaglejs-demo/
ISC License
4.08k stars 222 forks source link

feature: add presenter mode #46

Closed yaodingyd closed 6 years ago

yaodingyd commented 6 years ago

Intention: To be able have a presenter mode switch that when turned on, have a clone view in different a window, while main slides could have speaker's notes which are hidden in cloned view, and two views are synced.

Overview: This implementation follows Reveal.js and remark.js's similar implementations which use postMessage to communicate between different windows. While there are some other implementations out there, like react-present uses callback attached on window.opener, I have not explored those.

Also current implementation is part of core functions as I need to hijack previousStep/nextStep to fire postMessages call. If we want to make this a plug-in, previousStep/nextStep would be able to be extended, say accept callback. I think this might be a good idea as it would serve better if user want to extend previousStep/nextStep.

Details This implementation exposes two public data: presenterWindow and parentWindow. It also exposes a method togglePresenterMode. By default this method is bind to pressing "p".

Zulko commented 6 years ago

looks good to me in terms of core code modifications, i think its an important feature. Can you also add some doc somewhere explaining how to use it ? I think the the best would be an example slideshow featuring speaker notes and explaining how to put them in your slideshow.

yaodingyd commented 6 years ago

@Zulko I put up some slides to showcase this feature: demo. I try to make it look likes your entertaining yet informative ways :-)

yaodingyd commented 6 years ago

@Zulko not to rush, any time soon you can review my example? I'm thinking a new release also with adding CommonJS build (clearly people use nuxt a lot)

Zulko commented 6 years ago

Oh wow, this looks really good. Do you have access to the eagle-examples repo to add the example ?

yaodingyd commented 6 years ago

Thanks! And I do have access. I'll update everything and do a new release in the next few days.

yaodingyd commented 6 years ago

@Zulko 0.2.0 is out. Demo site/repo is update too.