feat(alerts): add scene-local recent ticker

Model the AlertBox and standalone ticker with shared settings; scene tickers render the in-memory active and queued events without saving history. Keep AlertBox content active-event-only.

Ref: https://obsproject.com/kb/obs-studio-overview
This commit is contained in:
2026-11-02 10:47:48 -08:00
parent 6208cb9409
commit 20f059422b
20 changed files with 339 additions and 90 deletions
+10 -1
View File
@@ -1,3 +1,5 @@
using System.Linq;
using ytLive.Models;
using ytLive.Services;
namespace ytLive.ViewModels;
@@ -44,8 +46,15 @@ public partial class MainViewModel
/// Reuses one <see cref="System.Windows.Media.Imaging.WriteableBitmap"/> and
/// overwrites its back buffer — a fresh bitmap every tick would churn the
/// render cache for no reason.</summary>
internal void PublishAlertTickerPreview(VideoFrame? frame)
internal void PublishAlertTickerPreview(VideoFrame? incomingFrame)
{
var frame = incomingFrame;
var previewScene = IsEditMode ? StagedScene : LiveScene ?? StagedScene;
var alertBox = previewScene?.Elements.OfType<Source>()
.FirstOrDefault(source => source.Type == SourceType.AlertBox && source.IsVisible);
if (_alertLayer.IsPlaying)
frame = _alertLayer.AlertBoxTickerFrame(alertBox);
if (frame == null)
{
if (_alertTickerBitmap != null)