Skip to content

Commit

Permalink
fix: resolveFlyKeyerFramesState state reversed + indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
mint-dewit committed Nov 29, 2023
1 parent 3e4ccf1 commit 72953da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/resolvers/upstreamKeyers/flyKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ export function resolveFlyKeyerFramesState(

for (const index of getAllKeysNumber(oldState, newState)) {
if (diffOptions === 'all' || diffOptions.includes(index)) {
const newKeyframe = fillDefaults(Defaults.Video.flyKeyframe(index), oldState?.[index])
const oldKeyframe = fillDefaults(Defaults.Video.flyKeyframe(index), newState?.[index])
const newKeyframe = fillDefaults(Defaults.Video.flyKeyframe(index), newState?.[index])
const oldKeyframe = fillDefaults(Defaults.Video.flyKeyframe(index), oldState?.[index])

const props = diffObject(oldKeyframe, newKeyframe)
const command = new AtemCommands.MixEffectKeyFlyKeyframeCommand(mixEffectId, upstreamKeyerId, index)
const command = new AtemCommands.MixEffectKeyFlyKeyframeCommand(mixEffectId, upstreamKeyerId, index + 1)
if (command.updateProps(props)) {
commands.push(command)
}
Expand Down

0 comments on commit 72953da

Please sign in to comment.