mirror of
https://github.com/gitpitch/gitpitch.git
synced 2024-04-18 07:30:55 +08:00
9c870227ac
GitPitch default reveal.js dependency is now 3.4.1. Also added support for new PITCHME.yaml property, called revealjs-version. This property allows a presentation owner to specify a specific version of reveal.js to use with their presentation. Currently supported versions are 3.4.1 or 3.3.1.
31 lines
819 B
JavaScript
31 lines
819 B
JavaScript
(function() {
|
|
|
|
// Don't emit events from inside of notes windows
|
|
if ( window.location.search.match( /receiver/gi ) ) { return; }
|
|
|
|
var multiplex = Reveal.getConfig().multiplex;
|
|
|
|
var socket = io.connect( multiplex.url );
|
|
|
|
function post() {
|
|
|
|
var messageData = {
|
|
state: Reveal.getState(),
|
|
secret: multiplex.secret,
|
|
socketId: multiplex.id
|
|
};
|
|
|
|
socket.emit( 'multiplex-statechanged', messageData );
|
|
|
|
};
|
|
|
|
// Monitor events that trigger a change in state
|
|
Reveal.addEventListener( 'slidechanged', post );
|
|
Reveal.addEventListener( 'fragmentshown', post );
|
|
Reveal.addEventListener( 'fragmenthidden', post );
|
|
Reveal.addEventListener( 'overviewhidden', post );
|
|
Reveal.addEventListener( 'overviewshown', post );
|
|
Reveal.addEventListener( 'paused', post );
|
|
Reveal.addEventListener( 'resumed', post );
|
|
|
|
}()); |