Skip to content

Commit

Permalink
Update guest.js
Browse files Browse the repository at this point in the history
  • Loading branch information
dalexhd authored Mar 9, 2021
1 parent 0bfe6ea commit 78c3efa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions assets/plugins/server/guest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit 78c3efa

Please sign in to comment.