files/reveal.js/plugin/notes-server/client.js in reveal-ck-3.6.0 vs files/reveal.js/plugin/notes-server/client.js in reveal-ck-3.7.0
- old
+ new
@@ -39,11 +39,16 @@
socket.emit( 'statechanged', messageData );
}
// When a new notes window connects, post our current state
- socket.on( 'connect', function( data ) {
+ socket.on( 'new-subscriber', function( data ) {
post();
+ } );
+
+ // When the state changes from inside of the speaker view
+ socket.on( 'statechanged-speaker', function( data ) {
+ Reveal.setState( data.state );
} );
// Monitor events that trigger a change in state
Reveal.addEventListener( 'slidechanged', post );
Reveal.addEventListener( 'fragmentshown', post );