Transitions in edit mode and on output: program transitions run while recording or streaming; the preview animates the outgoing picture (fade/move fade, wipe shrinks) in every mode

Test: PreviewTransitionTests (with the transition, wipe, and brand logo tests).
This commit is contained in:
2026-10-27 10:20:53 -07:00
parent 841c905c06
commit 7da287244b
4 changed files with 121 additions and 1 deletions
+7 -1
View File
@@ -115,14 +115,20 @@ public partial class MainViewModel
public void TransitionToScene(Scene scene)
{
if (scene.IsHidden || scene == StagedScene) return;
// The preview animates the outgoing picture before the switch, in every mode.
PreviewTransition?.Invoke(SelectedTransitionType, TransitionDurationMs);
StagedScene = scene;
if (IsLive)
// The program output transitions whenever it is running: recording or streaming.
if (IsLive || IsRecording)
{
LiveScene = scene;
_transition.Start(SelectedTransitionType, TransitionDurationMs, null);
}
}
/// <summary>Raised before a scene switch so the preview can animate the old picture away.</summary>
public event Action<TransitionType, double>? PreviewTransition;
/// <summary>
/// Apply the current transition type to the next StagedScene change while live.
/// Called from XAML when user picks a transition from the dropdown.