Skip to content

Commit 099c6ea

Browse files
committed
Set runOrderGroup when setting keys onAir
OnAir command should run after other commands when turning on, and before other commands when turning off so that key is not on air when it’s other settings are being changed.
1 parent 2ed9ea0 commit 099c6ea

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/resolvers/downstreamKeyer.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ export function resolveDownstreamKeyerState(
4141
if (!oldDsk.isAuto && newDsk.isAuto) {
4242
commands.push(new AtemCommands.DownstreamKeyAutoCommand(index))
4343
} else if (oldDsk.onAir !== newDsk.onAir) {
44-
commands.push(new AtemCommands.DownstreamKeyOnAirCommand(index, newDsk.onAir))
44+
const command = new AtemCommands.DownstreamKeyOnAirCommand(index, newDsk.onAir)
45+
command.runOrderGroup = newDsk.onAir ? 10 : -10 // OnAir command should run after other commands when turning on, and before other commands when turning off
46+
commands.push(command)
4547
}
4648
}
4749
}

src/resolvers/upstreamKeyers/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ export function resolveUpstreamKeyerState(
100100
}
101101

102102
if (thisDiffOptions.onAir && oldKeyer.onAir !== newKeyer.onAir) {
103-
commands.push(new AtemCommands.MixEffectKeyOnAirCommand(mixEffectId, upstreamKeyerId, newKeyer.onAir))
103+
const command = new AtemCommands.MixEffectKeyOnAirCommand(mixEffectId, upstreamKeyerId, newKeyer.onAir)
104+
command.runOrderGroup = newKeyer.onAir ? 10 : -10 // OnAir command should run after other commands when turning on, and before other commands when turning off
105+
commands.push(command)
104106
}
105107
}
106108

0 commit comments

Comments
 (0)