Skip to content

Commit

Permalink
fix: Remove ExpectedPlayoutItemContentBase from tsr-types [publish]
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian authored and ianshade committed May 7, 2021
1 parent e86f170 commit cd92561
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
10 changes: 4 additions & 6 deletions src/devices/device.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import * as _ from 'underscore'
import { TimelineState } from 'superfly-timeline'
import {
Mappings,
DeviceType,
ExpectedPlayoutItemContent
} from '../types/src'
import { Mappings, DeviceType } from '../types/src'
import { EventEmitter } from 'events'
import { CommandReport, DoOnTime } from '../doOnTime'
import { DeviceInitOptions, DeviceOptionsAny } from '../types/src/device'
import { MediaObject } from '../types/src/mediaObject'
import { ExpectedPlayoutItem } from '../expectedPlayoutItems'

/*
This is a base class for all the Device wrappers.
The Device wrappers will
Expand Down Expand Up @@ -189,7 +187,7 @@ export abstract class Device extends EventEmitter implements IDevice {
get supportsExpectedPlayoutItems (): boolean {
return false
}
public handleExpectedPlayoutItems (_expectedPlayoutItems: Array<ExpectedPlayoutItemContent>): void {
public handleExpectedPlayoutItems (_expectedPlayoutItems: Array<ExpectedPlayoutItem>): void {
// When receiving a new list of playoutItems.
// by default, do nothing
}
Expand Down
8 changes: 4 additions & 4 deletions src/devices/vizMSE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
TimelineObjVIZMSEElementInternal,
TimelineContentTypeVizMSE,
TimelineObjVIZMSEElementPilot,
ExpectedPlayoutItemContent,
VIZMSEPlayoutItemContent,
DeviceOptionsVizMSE,
TimelineObjVIZMSEAny,
Expand Down Expand Up @@ -45,6 +44,7 @@ import * as crypto from 'crypto'
import * as net from 'net'
import * as request from 'request'
import { MediaObject } from '../types/src/mediaObject'
import { ExpectedPlayoutItem } from '../expectedPlayoutItems'

/** The ideal time to prepare elements before going on air */
const IDEAL_PREPARE_TIME = 1000
Expand Down Expand Up @@ -224,7 +224,7 @@ export class VizMSEDevice extends DeviceWithState<VizMSEState> implements IDevic
get supportsExpectedPlayoutItems (): boolean {
return true
}
public handleExpectedPlayoutItems (expectedPlayoutItems: Array<ExpectedPlayoutItemContent>): void {
public handleExpectedPlayoutItems (expectedPlayoutItems: Array<ExpectedPlayoutItem>): void {
this.emit('debug', 'VIZDEBUG: handleExpectedPlayoutItems called')
if (this._vizmseManager) {
this.emit('debug', 'VIZDEBUG: manager exists')
Expand Down Expand Up @@ -778,7 +778,7 @@ class VizMSEManager extends EventEmitter {

private _rundown: VRundown | undefined
private _elementCache: {[hash: string]: CachedVElement } = {}
private _expectedPlayoutItems: Array<ExpectedPlayoutItemContent> = []
private _expectedPlayoutItems: Array<ExpectedPlayoutItem> = []
private _monitorAndLoadElementsTimeout?: NodeJS.Timer
private _monitorMSEConnectionTimeout?: NodeJS.Timer
private _lastTimeCommandSent: number = 0
Expand Down Expand Up @@ -868,7 +868,7 @@ class VizMSEManager extends EventEmitter {
* Set the collection of expectedPlayoutItems.
* These will be monitored and can be triggered to pre-load.
*/
public setExpectedPlayoutItems (expectedPlayoutItems: Array<ExpectedPlayoutItemContent>) {
public setExpectedPlayoutItems (expectedPlayoutItems: Array<ExpectedPlayoutItem>) {
this.emit('debug', 'VIZDEBUG: setExpectedPlayoutItems called')
if (this.preloadAllElements) {
this.emit('debug', 'VIZDEBUG: preload elements allowed')
Expand Down
10 changes: 10 additions & 0 deletions src/expectedPlayoutItems.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { ExpectedPlayoutItemContent } from './types/src'

export interface ExpectedPlayoutItemContentBase {
/** Id of the rundown the items comes from */
rundownId: string
/** Id of the rundown playlist the items comes from */
playlistId: string
}

export type ExpectedPlayoutItem = ExpectedPlayoutItemContent & ExpectedPlayoutItemContentBase
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

export * from './conductor'
export * from './doOnTime'
export * from './expectedPlayoutItems'
export { CasparCGDevice } from './devices/casparCG'
export { HyperdeckDevice } from './devices/hyperdeck'
export { QuantelDevice } from './devices/quantel'
Expand Down
10 changes: 1 addition & 9 deletions src/types/src/expectedPlayoutItems.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
import { VIZMSEPlayoutItemContent } from './vizMSE'

export type ExpectedPlayoutItemContent = ExpectedPlayoutItemContentVizMSE

export interface ExpectedPlayoutItemContentBase {
/** Id of the rundown the items comes from */
rundownId: string
/** Id of the rundown playlist the items comes from */
playlistId: string
}
export type ExpectedPlayoutItemContentVizMSE = ExpectedPlayoutItemContentBase & VIZMSEPlayoutItemContent
export type ExpectedPlayoutItemContent = VIZMSEPlayoutItemContent

0 comments on commit cd92561

Please sign in to comment.