bespoke-sync
Cross-client synchronization for Bespoke.js presentations
Setup with Server Sent Events (for Server -> Client communication) and plain XMLHttpRequests (for Client -> Server communication).
Can be used to setup two screens (e.g. one for audience one for presenter) in sync:
Audience screen: Your screen:
Above demo uses bespoke-notes plugin to display notes on presenter's laptop screen
Usage
Server
Use returned middleware as in example below. You can use it directly in your server handler, or handle it with Connect
var bespokeSyncMiddleware = require('bespoke-sync/server')({
log: false,
ssePath: '/sse-slides/',
xhrPath: '/slide/'
});
createServer(function (req, res) {
bespokeSyncMiddleware(req, res, function () {
});
});
Client (browser)
var sync = require('bespoke-sync/client');
bespoke.from(selector, [
sync({
log: false,
ssePath: '/sse-slides/',
xhrPath: '/slide/'
})
]);
Installation
npm
In your presentation path:
$ npm install bespoke-sync