refactor: roll mode

* chore: escalate stack trace to console

* refactor: event finding in roll

* docs: initial roll specification

* refactor: call to roll

* refactor: normalise index

* refactor: roll into next event

* refactor: hot reload on waiting to roll

* refactor: wait to roll next
This commit is contained in:
Carlos Valente
2024-08-04 21:34:01 +02:00
committed by GitHub
parent 3012d73285
commit da11ef64c2
21 changed files with 1093 additions and 982 deletions
@@ -1,4 +1,4 @@
import { OntimeEvent, Playback } from 'ontime-types';
import { PlayableEvent, Playback } from 'ontime-types';
import { deepmerge } from 'ontime-utils';
import { RuntimeState, addTime, clear, getState, load, pause, start, stop } from '../runtimeState.js';
@@ -11,7 +11,8 @@ const mockEvent = {
timeStart: 0,
timeEnd: 1000,
duration: 1000,
} as OntimeEvent;
skip: false,
} as PlayableEvent;
const mockState = {
clock: 666,
@@ -144,6 +145,7 @@ describe('mutation on runtimeState', () => {
// 5. Stop event
success = stop();
newState = getState();
expect(success).toBe(true);
expect(newState.eventNow).toBe(null);
expect(newState.timer).toMatchObject({