- Socials: the dialog is a right-rail drawer (same pattern as Stream Info/YPP/TEST); the live-screen button is removed - Right rail: Stream Info (was Stream Settings) and YPP show the YouTube logo; Socials and TEST get icons; tab colors and label colors per spec - Top bar: EDIT toggle beside REC (orange when on, blue when off); going live on YouTube turns it off - Stream readouts (bitrate, FPS, dropped n (x.y%), Live hh:mm:ss, health) and the resolution dropdown moved to the top-left cell; bottom bar emptied at the same height - Webcam border drawing restored (it was removed with the CRT bezel change) - YouTube chat layer: border color, thickness, and opacity controls - Vertical 1080p30 tier added Not related to the fps gate yet; no gating is enforced.
63 lines
2.5 KiB
C#
63 lines
2.5 KiB
C#
using ytLive.Services;
|
|
|
|
namespace ytLive.ViewModels;
|
|
|
|
public partial class MainViewModel
|
|
{
|
|
/// <summary>Test seam (mirrors CameraEnumeratorOverride): tests inject a fake
|
|
/// stats service before constructing the VM so refresh never hits the network.</summary>
|
|
internal static Func<ChannelStatsService>? ChannelStatsFactoryOverride { get; set; }
|
|
|
|
/// <summary>The YPP pull-out backing VM — the drawer below Stream Settings
|
|
/// on the Live screen's right edge (TASK 39).</summary>
|
|
public Services.YppTrackerViewModel Ypp { get; private set; } = null!;
|
|
|
|
/// <summary>The Test Stream pull-out backing VM — the TEST drawer at the
|
|
/// bottom of the right rail (TASK 41): mock chat input (real insert →
|
|
/// poll round-trip) + locally-simulated member / SuperChat / subscriber rows.</summary>
|
|
public Services.TestSessionViewModel TestSession { get; private set; } = null!;
|
|
|
|
private void InitYpp()
|
|
{
|
|
Ypp = new YppTrackerViewModel(
|
|
() => _layoutStore,
|
|
() => ChannelStatsFactoryOverride?.Invoke() ?? new ChannelStatsService(_youtubeAuth),
|
|
() => IsConnected,
|
|
() => _youtubeAuth.CurrentChannel?.DisplayName);
|
|
|
|
TestSession = new TestSessionViewModel(
|
|
_youtubeStream,
|
|
_youtubeChat,
|
|
onEndStream: StopStream);
|
|
|
|
// One drawer at a time: the three pull-outs share the preview's right edge,
|
|
// so opening one collapses the other two (all directions).
|
|
BroadcastForm.PropertyChanged += (_, e) =>
|
|
{
|
|
if (e.PropertyName == nameof(LiveBroadcastFormViewModel.IsDrawerOpen) && BroadcastForm.IsDrawerOpen)
|
|
{
|
|
Ypp.IsDrawerOpen = false;
|
|
TestSession.IsDrawerOpen = false;
|
|
CloseSocialsDrawer();
|
|
}
|
|
};
|
|
Ypp.PropertyChanged += (_, e) =>
|
|
{
|
|
if (e.PropertyName == nameof(YppTrackerViewModel.IsDrawerOpen) && Ypp.IsDrawerOpen)
|
|
{
|
|
BroadcastForm.IsDrawerOpen = false;
|
|
TestSession.IsDrawerOpen = false;
|
|
CloseSocialsDrawer();
|
|
}
|
|
};
|
|
TestSession.PropertyChanged += (_, e) =>
|
|
{
|
|
if (e.PropertyName == nameof(TestSessionViewModel.IsDrawerOpen) && TestSession.IsDrawerOpen)
|
|
{
|
|
BroadcastForm.IsDrawerOpen = false;
|
|
Ypp.IsDrawerOpen = false;
|
|
CloseSocialsDrawer();
|
|
}
|
|
};
|
|
}
|
|
} |