How to use the timeline-state-resolver-types.DeviceType.PHAROS function in timeline-state-resolver-types

To help you get started, we’ve selected a few timeline-state-resolver-types examples, based on popular ways it is used in public projects.

github nrkno / tv-automation-server-core / meteor / server / databaseMigrationSystemSteps.ts View on Github external
validate: () => {
			let device = PeripheralDevices.findOne({type: PeripheralDeviceAPI.DeviceType.PLAYOUT})
			if (!device) return 'Playout-gateway not found'
			let settings = device.settings || {devices: {}} as PlayoutDeviceSettings

			let pharos0 = settings.devices['pharos0'] as PlayoutDeviceSettingsDevicePharos
			if (!pharos0) return '"pharos0" missing'
			// @ts-ignore
			if (!pharos0.options) pharos0.options = {}
			if (pharos0.type !== PlayoutDeviceType.PHAROS) return 'Type is not "PHAROS"'
			// let cameraDevices = pharos0.options.cameraDevices

			return false
		},
		migrate: () => {
github nrkno / tv-automation-server-core / meteor / server / databaseMigrationSystemSteps.ts View on Github external
migrate: () => {
			let device = PeripheralDevices.findOne({type: PeripheralDeviceAPI.DeviceType.PLAYOUT})
			if (device) {
				// Set some default values:
				let pharos0 = device.settings && device.settings.devices['pharos0']
				if (!pharos0) {
					logger.info(`Migration: Add PeripheralDevice.settings to ${device._id}: pharos0`)
					PeripheralDevices.update(device._id, {$set: {
						'settings.devices.pharos0': {
							type: PlayoutDeviceType.PHAROS,
							options: {
								host: ''
							}
						}
					}})
				}
			}
		},
		input: [{
github nrkno / tv-automation-server-core / meteor / server / databaseMigrationSystemSteps.ts View on Github external
host: ''
							}
						}
					}})
				}
			}
		},
		input: [{
			label: 'Playout-gateway: device "pharos0" not set up',
			description: 'Go into the settings of the Playout-gateway and setup the device "pharos0". ($validation)',
			inputType: null,
			attribute: null
		}]
	},
	ensureMapping('pharos_lights', literal<MappingExt>({
		device: PlayoutDeviceType.PHAROS,
		deviceId: 'pharos0',
		lookahead: LookaheadMode.NONE,
	})),
	ensureMapping('ptz0_zoom', literal<MappingPanasonicPtz & MappingExt>({
		device: PlayoutDeviceType.PANASONIC_PTZ,
		deviceId: 'ptz0',
		mappingType: MappingPanasonicPtzType.ZOOM,
		lookahead: LookaheadMode.NONE,
	})),
	ensureMapping('ptz0_zoom_speed', literal<MappingPanasonicPtz & MappingExt>({
		device: PlayoutDeviceType.PANASONIC_PTZ,
		deviceId: 'ptz0',
		mappingType: MappingPanasonicPtzType.ZOOM_SPEED,
		lookahead: LookaheadMode.NONE,
	})),
	ensureStudioConfig('ApningCameraInitialZoom', 0),