mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-20 06:29:07 +00:00
inti relative mode
This commit is contained in:
@@ -4,6 +4,7 @@ import {
|
||||
isPlayableEvent,
|
||||
LogOrigin,
|
||||
MaybeNumber,
|
||||
OffsetMode,
|
||||
OntimeEvent,
|
||||
Playback,
|
||||
TimerLifeCycle,
|
||||
@@ -37,6 +38,7 @@ import {
|
||||
import { getForceUpdate, getShouldClockUpdate, getShouldTimerUpdate } from './rundownService.utils.js';
|
||||
import { skippedOutOfEvent } from '../timerUtils.js';
|
||||
import { triggerAutomations } from '../../api-data/automation/automation.service.js';
|
||||
import { getDataProvider } from '../../classes/data-provider/DataProvider.js';
|
||||
|
||||
type RuntimeStateEventKeys = keyof Pick<RuntimeState, 'eventNext' | 'eventNow' | 'publicEventNow' | 'publicEventNext'>;
|
||||
|
||||
@@ -68,6 +70,14 @@ class RuntimeService {
|
||||
RuntimeService.previousState = {} as RuntimeState;
|
||||
}
|
||||
|
||||
@broadcastResult
|
||||
setOffsetMode(mode: OffsetMode) {
|
||||
runtimeState.setOffsetMode(mode);
|
||||
process.nextTick(() => {
|
||||
getDataProvider().setOffsetMode(mode);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks result of an update and notifies integrations as needed
|
||||
* This is the only exception of a private method that has broadcast result
|
||||
|
||||
Reference in New Issue
Block a user