mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-18 21:54:09 +00:00
small responsiveness improvements
broadcast every change
This commit is contained in:
@@ -119,14 +119,11 @@ class Timer {
|
||||
return Timer.toSeconds(this.current);
|
||||
}
|
||||
|
||||
get playState() {
|
||||
return this.state;
|
||||
}
|
||||
|
||||
// playback
|
||||
start() {
|
||||
// do we need to change
|
||||
if (this.state === 'start') return;
|
||||
else if (this.duration === 0) return;
|
||||
else if (this.startedAt == null) {
|
||||
const now = this._getCurrentTime();
|
||||
this._startedAt = now;
|
||||
@@ -146,6 +143,8 @@ class Timer {
|
||||
// do we need to change
|
||||
if (this.state === 'pause') return;
|
||||
|
||||
else if (this.duration === 0) return;
|
||||
|
||||
// update pause time
|
||||
this._pausedAt = this._getCurrentTime();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user