forked from Sofie-Automation/sofie-core
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathonTakeContext.ts
More file actions
27 lines (26 loc) · 1.11 KB
/
onTakeContext.ts
File metadata and controls
27 lines (26 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { IBlueprintPart, IBlueprintPiece, IEventContext, IShowStyleUserContext, Time } from '../index.js'
import { IPartAndPieceActionContext } from './partsAndPieceActionContext.js'
import { IExecuteTSRActionsContext, ITriggerIngestChangeContext } from './executeTsrActionContext.js'
import { ITTimersContext } from './tTimersContext.js'
/**
* Context in which 'current' is the partInstance we're leaving, and 'next' is the partInstance we're taking
*/
export interface IOnTakeContext
extends
IPartAndPieceActionContext,
IShowStyleUserContext,
IEventContext,
IExecuteTSRActionsContext,
ITriggerIngestChangeContext,
ITTimersContext {
/** Inform core that a take out of the taken partinstance should be blocked until the specified time */
blockTakeUntil(time: Time | null): Promise<void>
/**
* Prevent the take.
* All modifications to the pieceInstances and partInstance done through this context will be persisted,
* but the next part will not be taken.
*/
abortTake(): void
/** Insert a queued part to follow the taken part */
queuePartAfterTake(part: IBlueprintPart, pieces: IBlueprintPiece[]): void
}