How to use the timeline-state-resolver-types.DeviceType.HTTPSEND 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
migrate: () => {
			let device = PeripheralDevices.findOne({type: PeripheralDeviceAPI.DeviceType.PLAYOUT})
			if (device) {
				// Set some default values:
				let http0 = device.settings && device.settings.devices['http0']
				if (!http0) {
					logger.info(`Migration: Add PeripheralDevice.settings to ${device._id}: http0`)
					PeripheralDevices.update(device._id, {$set: {
						'settings.devices.http0': {
							type: PlayoutDeviceType.HTTPSEND,
							options: {
								host: '',
								port: 9910,
							}
						}
					}})
				}
			}
		},
		input: [{
github nrkno / tv-automation-server-core / meteor / server / databaseMigrationSystemSteps.ts View on Github external
})),
	ensureStudioConfig('sources_kam_ptz', '1:ptz0'),
	ensureDeviceVersion('ensureVersion.mosDevice', PeripheralDeviceAPI.DeviceType.MOSDEVICE, '_process', '0.1.1')
])

// 0.18.0: Release 4
addMigrationSteps( '0.18.0', [
	removeMapping('nora_permanent_klokke'),
	removeMapping('nora_permanent_logo'),
	ensureMapping('nora_primary_klokke', literal<MappingExt>({
		device: PlayoutDeviceType.HTTPSEND,
		deviceId: 'http0',
		lookahead: LookaheadMode.NONE,
	})),
	ensureMapping('nora_primary_logo', literal<MappingExt>({
		device: PlayoutDeviceType.HTTPSEND,
		deviceId: 'http0',
		lookahead: LookaheadMode.NONE,
	})),
	removeMapping('casparcg_cg_permanent'),
	{
		id: 'mapping.casparcg_player_wipe.lookahead',
		canBeRunAutomatically: true,
		validate: () => {
			let studio = StudioInstallations.findOne()
			if (!studio) return 'Studio not found'

			let dbMapping = studio.mappings['casparcg_player_wipe']
			if (!dbMapping) return false

			if (dbMapping.lookahead !== LookaheadMode.PRELOAD) return `Mapping "casparcg_player_wipe" wrong lookahead mode`
github nrkno / tv-automation-server-core / meteor / server / databaseMigrationSystemSteps.ts View on Github external
ensureMapping('ptz0_speed', literal<MappingPanasonicPtz & MappingExt>({
		device: PlayoutDeviceType.PANASONIC_PTZ,
		deviceId: 'ptz0',
		mappingType: MappingPanasonicPtzType.PRESET_SPEED,
		lookahead: LookaheadMode.NONE,
	})),
	ensureStudioConfig('sources_kam_ptz', '1:ptz0'),
	ensureDeviceVersion('ensureVersion.mosDevice', PeripheralDeviceAPI.DeviceType.MOSDEVICE, '_process', '0.1.1')
])

// 0.18.0: Release 4
addMigrationSteps( '0.18.0', [
	removeMapping('nora_permanent_klokke'),
	removeMapping('nora_permanent_logo'),
	ensureMapping('nora_primary_klokke', literal<MappingExt>({
		device: PlayoutDeviceType.HTTPSEND,
		deviceId: 'http0',
		lookahead: LookaheadMode.NONE,
	})),
	ensureMapping('nora_primary_logo', literal<MappingExt>({
		device: PlayoutDeviceType.HTTPSEND,
		deviceId: 'http0',
		lookahead: LookaheadMode.NONE,
	})),
	removeMapping('casparcg_cg_permanent'),
	{
		id: 'mapping.casparcg_player_wipe.lookahead',
		canBeRunAutomatically: true,
		validate: () => {
			let studio = StudioInstallations.findOne()
			if (!studio) return 'Studio not found'
github nrkno / tv-automation-server-core / meteor / server / api / initiateDatabase.ts View on Github external
'settings.devices.lawo0': ((pd['settings'] || {})['devices'] || {})['lawo0'] || {
					type: PlayoutDeviceType.LAWO,
					options: {
						host: '160.67.96.51',
						port: 9000,
						sourcesPath: 'Sapphire.Sources',
						rampMotorFunctionPath: '1.5.2'
					}
				},
				'settings.devices.abstract0': ((pd['settings'] || {})['devices'] || {})['abstract0'] || {
					type: PlayoutDeviceType.ABSTRACT,
					options: {
					}
				},
				'settings.devices.http0': ((pd['settings'] || {})['devices'] || {})['http0'] || {
					type: PlayoutDeviceType.HTTPSEND,
					options: {
					}
				},
				'settings.devices.hyperdeck0': ((pd['settings'] || {})['devices'] || {})['hyperdeck0'] || {
					type: PlayoutDeviceType.HYPERDECK,
					options: {
						host: '160.67.87.53',
						port: 9993
					}
				},
			}})
			// PeripheralDevices.update(pd._id, {$set: {
			// 	mappings: mappings
			// }})
		})
		_.each(((PeripheralDevices.findOne('initDBPlayoutDeviceParent') || {})['settings'] || {}).devices, (device, key) => {
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 http0 = settings.devices['http0'] as PlayoutDeviceSettingsDevice
			if (!http0) return '"http0" missing'
			if (http0.type !== PlayoutDeviceType.HTTPSEND) return 'Type is not "HTTPSEND"'

			return false
		},
		migrate: () => {