From 78c3efaa03503f70e296a89b39b5281a9bf941df Mon Sep 17 00:00:00 2001 From: DalexHD Date: Tue, 9 Mar 2021 18:41:03 +0100 Subject: [PATCH] Update guest.js --- assets/plugins/server/guest.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/assets/plugins/server/guest.js b/assets/plugins/server/guest.js index c097241..820410f 100644 --- a/assets/plugins/server/guest.js +++ b/assets/plugins/server/guest.js @@ -4,12 +4,16 @@ const initClient = function (Reveal) { const socket = require("./socket").default; socket.on("statechanged", function (data) { + // Ignore events if we are not following the pressenter. By default we follow the pressenter. + if (!window.$nuxt.$store.app.store.state.settings.follow) return; Reveal.setState(data.state); }); socket.on( "plyrchanged", function ({ event, data: { id, currentTime, paused, playing, ended } }) { + // Ignore events if we are not following the pressenter. By default we follow the pressenter. + if (!window.$nuxt.$store.app.store.state.settings.follow) return; const player = document.getElementById(id); switch (event) { case "play":