vendor/reveal.js/plugin/notes-server/client.js in slide_hero-0.0.10 vs vendor/reveal.js/plugin/notes-server/client.js in slide_hero-0.0.11
- 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 );