Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
Develop (#41)
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Julusian committed Aug 6, 2019
2 parents 54893b7 + 39b91b5 commit 3289138
Show file tree
Hide file tree
Showing 6 changed files with 684 additions and 605 deletions.
14 changes: 4 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,26 +58,20 @@
"npm-scripts-info": "^0.3.9",
"opn-cli": "^5.0.0",
"sleep-ms": "^2.0.1",
"standard-version": "^6.0.1",
"timeline-state-resolver-types": "^3.0.1",
"trash-cli": "^2.0.0",
"standard-version": "^7.0.0",
"trash-cli": "^3.0.0",
"ts-jest": "^24.0.0",
"tslint": "^5.12.1",
"tslint-config-standard": "^8.0.1",
"typedoc": "^0.14.2",
"typedoc": "^0.15.0",
"typescript": "^3.3.3"
},
"resolutions": {
"typedoc/**/marked": "^0.6.2"
},
"dependencies": {
"moment": "^2.22.2",
"timeline-state-resolver-types": "^3.2.0",
"tslib": "^1.9.3",
"underscore": "^1.9.1"
},
"peerDependencies": {
"timeline-state-resolver-types": "^3.0.1"
},
"standard-version": {
"message": "chore(release): %s [skip ci]",
"tagPrefix": ""
Expand Down
10 changes: 8 additions & 2 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,23 @@ export interface ShowStyleBlueprintManifest extends BlueprintManifestBase {
onPostTake?: (context: EventContext & PartEventContext) => Promise<void>

/** Called after the timeline has been generated, used to manipulate the timeline */
onTimelineGenerate?: (context: EventContext & RundownContext, timeline: OnGenerateTimelineObj[], previousPartEndState: PartEndState | undefined, resolvedPieces: IBlueprintPieceDB[]) => Promise<OnGenerateTimelineObj[]>
onTimelineGenerate?: (context: EventContext & RundownContext, timeline: OnGenerateTimelineObj[], previousPersistentState: TimelinePersistentState | undefined, previousPartEndState: PartEndState | undefined, resolvedPieces: IBlueprintPieceDB[]) => Promise<BlueprintResultTimeline>

/** Called just before taking the next part. This generates some persisted data used by onTimelineGenerate to modify the timeline based on the previous part (eg, persist audio levels) */
getEndStateForPart?: (context: RundownContext, previousEndState: PartEndState | undefined, activePieces: IBlueprintPiece[]) => PartEndState
getEndStateForPart?: (context: RundownContext, previousPersistentState: TimelinePersistentState | undefined, previousPartEndState: PartEndState | undefined, resolvedPieces: IBlueprintPiece[], time: number) => PartEndState

/** Called after an as-run event is created */
onAsRunEvent?: (context: EventContext & AsRunEventContext) => Promise<IBlueprintExternalMessageQueueObj[]>

}

export type PartEndState = { [key: string]: any }
export type TimelinePersistentState = { [key: string]: any }

export interface BlueprintResultTimeline {
timeline: OnGenerateTimelineObj[]
persistentState: TimelinePersistentState
}

export interface BlueprintResultRundown {
rundown: IBlueprintRundown
Expand Down
3 changes: 3 additions & 0 deletions src/rundown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ export interface IBlueprintPiece extends IBlueprintPieceGeneric {
}
export interface IBlueprintPieceDB extends IBlueprintPiece {
playoutDuration?: number

/** This is the id of the original segment of an infinite piece chain. If it matches the id of itself then it is the first in the chain */
infiniteId?: string
}

export interface IBlueprintAdLibPiece extends IBlueprintPieceGeneric {
Expand Down
2 changes: 2 additions & 0 deletions src/studio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ export interface BlueprintMappings extends Mappings {
export interface BlueprintMapping extends Mapping {
/** What method core should use to create lookahead objects for this layer */
lookahead: LookaheadMode
/** How many lookahead objects to create for this layer. Default = 1 */
lookaheadDepth?: number
}
1 change: 1 addition & 0 deletions src/timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ export interface TimelineObjectCoreExt extends TSRTimelineObjBase {
/** TimelineObject extension for additional fields needed by onTimelineGenerate */
export interface OnGenerateTimelineObj extends TimelineObjectCoreExt {
pieceId?: string
infinitePieceId?: string
}
Loading

0 comments on commit 3289138

Please sign in to comment.