File tree Expand file tree Collapse file tree 1 file changed +12
-13
lines changed
packages/job-worker/src/playout/timeline Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -201,32 +201,31 @@ function preserveOrReplaceNowTimesInObjects(
201
201
}
202
202
203
203
function logAnyRemainingNowTimes ( _context : JobContext , timelineObjs : Array < TimelineObjGeneric > ) : void {
204
- const ids : string [ ] = [ ]
205
-
206
- const hasNow = ( obj : TimelineEnableExt | TimelineEnableExt [ ] ) => {
207
- let res = false
208
- applyToArray ( obj , ( enable ) => {
209
- if ( enable . start === 'now' || enable . end === 'now' ) res = true
210
- } )
211
- return res
212
- }
204
+ const badTimelineObjs : any [ ] = [ ]
213
205
214
206
for ( const obj of timelineObjs ) {
215
207
if ( hasNow ( obj . enable ) ) {
216
- ids . push ( obj . id )
208
+ badTimelineObjs . push ( obj )
217
209
}
218
210
219
211
for ( const kf of obj . keyframes || [ ] ) {
220
212
if ( hasNow ( kf . enable ) ) {
221
- ids . push ( kf . id )
213
+ badTimelineObjs . push ( kf )
222
214
}
223
215
}
224
216
}
225
217
226
- if ( ids . length ) {
227
- logger . error ( `Some timeline objects have unexpected now times!: ${ JSON . stringify ( ids ) } ` )
218
+ if ( badTimelineObjs . length ) {
219
+ logger . error ( `Some timeline objects have unexpected now times!: ${ JSON . stringify ( badTimelineObjs ) } ` )
228
220
}
229
221
}
222
+ function hasNow ( obj : TimelineEnableExt | TimelineEnableExt [ ] ) {
223
+ let res = false
224
+ applyToArray ( obj , ( enable ) => {
225
+ if ( enable . start === 'now' || enable . end === 'now' ) res = true
226
+ } )
227
+ return res
228
+ }
230
229
231
230
/** Store the timelineobjects into the model, and perform any post-save actions */
232
231
export function saveTimeline (
You can’t perform that action at this time.
0 commit comments