diff --git a/server/classes/Timer.js b/server/classes/Timer.js index 6fd83e5e3..d322c8bf4 100644 --- a/server/classes/Timer.js +++ b/server/classes/Timer.js @@ -50,6 +50,9 @@ class Timer { // check playstate switch (this.state) { case 'start': + // ensure we have a start time + if (this._startedAt == null) this._startedAt = now; + // update current timer this.current = this._startedAt + this.duration + this._pausedTotal - now; diff --git a/server/controllers/OscController.js b/server/controllers/OscController.js index 488442002..dba6d9cc1 100644 --- a/server/controllers/OscController.js +++ b/server/controllers/OscController.js @@ -63,6 +63,7 @@ const initiateOSC = (config) => { try { let eventIndex = parseInt(args); if (isNaN(eventIndex) || eventIndex <= 0) return; + global.timer.pause(); global.timer.loadEvent(eventIndex - 1, undefined, true); } catch (error) { console.log('error calling goto: ', error);