How to use the mos-connection.IMOSObjectStatus function in mos-connection

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

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nrkno / tv-automation-server-core / meteor / server / api / ingest / mosDevice / actions.ts View on Github external
export function notifyCurrentPlayingPart (
		peripheralDevice: PeripheralDevice,
		rundown: Rundown,
		oldPlayingPartExternalId: string | null,
		newPlayingPartExternalId: string | null
	) {

		if (oldPlayingPartExternalId) {
			setStoryStatus(peripheralDevice._id, rundown, oldPlayingPartExternalId, MOS.IMOSObjectStatus.STOP)
			.catch(e => logger.error('Error in setStoryStatus', e))
		}
		if (newPlayingPartExternalId) {
			setStoryStatus(peripheralDevice._id, rundown, newPlayingPartExternalId, MOS.IMOSObjectStatus.PLAY)
			.catch(e => logger.error('Error in setStoryStatus', e))
		}
	}
	function setStoryStatus (deviceId: string, rundown: Rundown, storyId: string, status: MOS.IMOSObjectStatus): Promise {