summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--plugin/speakernotes/client.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/plugin/speakernotes/client.js b/plugin/speakernotes/client.js
index 43dc126..757e6cd 100644
--- a/plugin/speakernotes/client.js
+++ b/plugin/speakernotes/client.js
@@ -8,6 +8,25 @@
console.log('View slide notes at ' + window.location.origin + '/notes/' + socketId);
window.open(window.location.origin + '/notes/' + socketId, 'notes-' + socketId);
+ // Fires when a fragment is shown
+ Reveal.addEventListener( 'fragmentshown', function( event ) {
+ var fragmentData = {
+ showFragment : true,
+ socketId : socketId
+ };
+ socket.emit('fragmentchanged', fragmentData);
+ } );
+
+ // Fires when a fragment is hidden
+ Reveal.addEventListener( 'fragmenthidden', function( event ) {
+ var fragmentData = {
+ hideFragment : true,
+ socketId : socketId
+ };
+ socket.emit('fragmentchanged', fragmentData);
+ } );
+
+ // Fires when slide is changed
Reveal.addEventListener( 'slidechanged', function( event ) {
var nextindexh;
var nextindexv;