The Conductor class serves as the main class for interacting. It contains methods for setting mappings, timelines and adding/removing devices. It keeps track of when to resolve the timeline and updates the devices with new states.

Hierarchy

Constructors

Properties

_actionQueue: default<default, DefaultAddOptions> = ...
_callbackInstances: Map<string, CallbackInstance> = ...
_datastore: Datastore = {}
_deviceStates: {
    [deviceId: string]: DeviceState[];
} = {}

Type declaration

  • [deviceId: string]: DeviceState[]
_doOnTime: DoOnTime
_estimateResolveTimeMultiplier: number = 1
_getCurrentTime?: (() => number)

Type declaration

    • (): number
    • Returns number

_interval: Timer
_isInitialized: boolean = false
_logDebug: boolean = false
_mappings: Mappings<unknown> = {}
_multiThreadedResolver: boolean = false
_nextResolveTime: number = 0
_resolveTimelineTrigger: undefined | Timer
_resolved: {
    resolveTime: number;
    resolvedTimeline: null | ResolvedTimeline<TSRTimelineContent>;
    validTo: number;
} = ...

Type declaration

  • resolveTime: number

    Timestamp, when the timeline was resolved

  • resolvedTimeline: null | ResolvedTimeline<TSRTimelineContent>
  • validTo: number

    Timestamp, when the timeline needs to be re-resolved

_resolver: Promisify<AsyncResolver>
_sentCallbacks: TimelineCallbacks = {}
_statMeasureReason: string = ''
_statMeasureStart: number = 0
_statReports: StatReport[] = []
_timeline: TSRTimeline = []
_timelineHash: undefined | string
_timelineSize: undefined | number = undefined
_triggerSendStartStopCallbacksTimeout: null | Timer = null
_useCacheWhenResolving: boolean = false
activationId: undefined | string
devices: Map<string, BaseRemoteDeviceIntegration<DeviceOptionsBase<any>>> = ...

Accessors

Methods

  • Adds a device that can be referenced by the timeline and mappings. NOTE: use this with caution! if a device fails to initialise (i.e. because the hardware is turned off) this may never resolve. It is preferred to use createDevice and initDevice separately for this reason.

    Returns

    A promise that resolves with the created device, or rejects with an error message.

    Parameters

    • deviceId: string

      Id used by the mappings to reference the device.

    • deviceOptions: DeviceOptionsAnyInternal

      The options used to initalize the device

    • Optional activeRundownPlaylistId: string

    Returns Promise<BaseRemoteDeviceIntegration<DeviceOptionsBase<any>>>

  • Creates an uninitialised device that can be referenced by the timeline and mappings.

    Returns

    A promise that resolves with the created device, or rejects with an error message.

    Parameters

    • deviceId: string

      Id used by the mappings to reference the device.

    • deviceOptions: DeviceOptionsAnyInternal

      The options used to initalize the device

    • Optional options: {
          signal?: AbortSignal;
      }

      Additional options

      • Optional signal?: AbortSignal

    Returns Promise<BaseRemoteDeviceIntegration<DeviceOptionsBase<any>>>

  • Send a makeReady-trigger to all devices

    Deprecated

    replace by TSR actions

    Parameters

    • Optional okToDestroyStuff: boolean
    • Optional activationId: string

    Returns Promise<void>

  • Send a standDown-trigger to all devices

    Deprecated

    replaced by TSR actions

    Parameters

    • Optional okToDestroyStuff: boolean

    Returns Promise<void>

  • Calls each of the listeners registered for a given event.

    Type Parameters

    Parameters

    Returns boolean

  • Return an array listing the events for which the emitter has registered listeners.

    Returns (keyof ConductorEvents)[]

  • Initialises an existing device that can be referenced by the timeline and mappings.

    Returns

    A promise that resolves with the initialised device, or rejects with an error message.

    Parameters

    • deviceId: string

      Id used by the mappings to reference the device.

    • deviceOptions: DeviceOptionsAnyInternal

      The options used to initalize the device

    • Optional activeRundownPlaylistId: string

      Id of the current rundown playlist

    • Optional options: {
          signal?: AbortSignal;
      }

      Additional options

      • Optional signal?: AbortSignal

    Returns Promise<BaseRemoteDeviceIntegration<DeviceOptionsBase<any>>>

  • Return the number of listeners listening to a given event.

    Parameters

    Returns number

  • Return the listeners registered for a given event.

    Type Parameters

    Parameters

    • event: T

    Returns ((...args: ArgumentMap<ConductorEvents>[Extract<T, keyof ConductorEvents>]) => void)[]

  • Remove all listeners, or those of the specified event.

    Parameters

    Returns Conductor

  • Calculates the estimated time it'll take to resolve a timeline of a certain size

    Parameters

    • timelineSize: number
    • multiplier: number

    Returns number

Generated using TypeDoc