Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
dynamicallyInserted: undefined,
_id: 'baseline',
mosId: 'baseline',
runningOrderId: '',
name: 'baseline',
status: RundownAPI.LineItemStatusCode.UNKNOWN,
sourceLayerId: SourceLayers.camera0,
outputLayerId: 'pgm0',
content: {
timelineObjects: [
// Default timeline
literal({
_id: '', deviceId: [''], siId: '', roId: '',
trigger: { type: TriggerType.LOGICAL, value: '1' },
priority: 0, duration: 0,
LLayer: LLayers.atem_me_program,
content: {
type: TimelineContentTypeAtem.ME,
attributes: {
input: AtemSource.Default,
transition: Atem_Enums.TransitionStyle.CUT
}
}
}),
literal({
_id: '', deviceId: [''], siId: '', roId: '',
trigger: { type: TriggerType.LOGICAL, value: '1' },
priority: 0, duration: 0,
LLayer: LLayers.atem_usk_effect_default,
content: {
LLayer: 'atem_dsk_effect',
content: {
type: TimelineContentType.ATEM_DSK,
// transitions?: {
// inTransition?: TimelineTransition
// }
attributes: {
onAir: true,
fillSource: 12,
keySource: 13
}
}
}),
literal({
_id: '', deviceId: '',
trigger: { type: TriggerType.LOGICAL, value: '1' },
priority: -1, duration: 0,
LLayer: 'atem_dsk_effect',
content: {
type: TimelineContentType.ATEM_SSRC,
// transitions?: {
// inTransition?: TimelineTransition
// }
attributes: {
boxes: [
{
enabled: true,
source: 1
},
{
enabled: true,
source: 4
let currentPart: Part | undefined
let nextPart: Part | undefined
// let currentPieces: Array = []
let previousPart: Part | undefined
let activeRundown = rundownData.rundown
timelineObjs.push(literal({
studioId: '', // set later
id: '', // set later
objectType: TimelineObjType.RUNDOWN,
rundownId: rundownData.rundown._id,
_id: activeRundown._id + '_status',
trigger: {
type: TriggerType.LOGICAL,
value: '1'
},
LLayer: 'rundown_status',
isAbstract: true,
content: {},
classes: [activeRundown.rehearsal ? 'rundown_rehersal' : 'rundown_active']
}))
// Fetch the nextPart first, because that affects how the currentPart will be treated
if (activeRundown.nextPartId) {
// We may be at the beginning of a show, and there can be no currentPart and we are waiting for the user to Take
nextPart = rundownData.partsMap[activeRundown.nextPartId]
if (!nextPart) throw new Meteor.Error(404, `Part "${activeRundown.nextPartId}" not found!`)
}
if (activeRundown.currentPartId) {
import { TimelineContentType, TimelineObj, TimelineObjCCGVideo, TimelineObjLawoSource, TimelineObjAtemME, TimelineObjCCGTemplate, TimelineObjAtemDSK, TimelineObjAtemAUX, Atem_Enums, TimelineObjAtemSsrc } from '../../meteor/lib/collections/Timeline'
import { TriggerType } from 'superfly-timeline'
const literal = (o: T) => o
const defaultTimeline = [
literal({
_id: '', deviceId: '',
trigger: { type: TriggerType.LOGICAL, value: '1' },
priority: -1, duration: 0,
LLayer: 'atem_me_program',
content: {
type: TimelineContentType.ATEM_ME,
// transitions?: {
// inTransition?: TimelineTransition
// }
attributes: {
input: 1, // to be changed?
transition: Atem_Enums.TransitionStyle.CUT
}
}
}),
literal({
_id: '', deviceId: '',
trigger: { type: TriggerType.LOGICAL, value: '1' },
function convertTimelineKeyframe (obj: any): any {
const newKf: any = {
id: obj.id,
enable: {
},
// children?: Array
// keyframes?: Array
classes: obj.classes,
// disabled: boolean
content: obj.content
}
if (obj.trigger.type === TriggerType.TIME_ABSOLUTE) {
newKf.enable.start = obj.trigger.value
} else if (obj.trigger.type === TriggerType.TIME_RELATIVE) {
newKf.enable.start = obj.trigger.value
} else if (obj.trigger.type === TriggerType.LOGICAL) {
newKf.enable.while = obj.trigger.value
}
if (obj.duration) {
newKf.enable.duration = obj.duration
}
return newKf
}
literal({
_id: '', deviceId: [''], siId: '', roId: '',
trigger: { type: TriggerType.LOGICAL, value: '1' },
priority: 0, duration: 0,
LLayer: LLayers.casparcg_cg_graphics,
content: {
type: TimelineContentTypeCasparCg.HTMLPAGE,
attributes: {
url: noraHostRender + '/?group=' + noraGroup + '&channel=' + NoraChannels.super + '&name=sofie-dev-cg&_=' + Date.now()
}
}
}),
literal({
_id: '', deviceId: [''], siId: '', roId: '',
trigger: { type: TriggerType.LOGICAL, value: '1' },
priority: 0, duration: 0,
LLayer: LLayers.casparcg_cg_logo,
content: {
type: TimelineContentTypeCasparCg.HTMLPAGE,
attributes: {
url: noraHostRender + '/?group=' + noraGroup + '&channel=' + NoraChannels.logo + '&name=sofie-dev-logo&_=' + Date.now()
}
}
}),
literal({
_id: '', deviceId: [''], siId: '', roId: '',
trigger: { type: TriggerType.LOGICAL, value: '1' },
priority: 0, duration: 0,
LLayer: LLayers.casparcg_cg_studiomonitor,
content: {
type: TimelineContentTypeCasparCg.HTMLPAGE,