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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user