Files
gramps 0fac1e6a5a TASK 5 items 1-3: reusable stream, health banner, docs refresh
- Reusable stream: GetOrCreateReusableStreamAsync, cached via LayoutStore, bound at broadcast insert
- Health monitoring: GetStreamHealthAsync polls liveStreams.status, report-by-exception banner
- Go-live order: ensure stream → create broadcast → then start pump (URL must exist first)
- Full broadcast form scoped (TASK 5 items 6-7) in TASKS.md + ai.md
- TASK 23 trimmed to technical scope, TASK 26 added (marcom/launch kit)
- Confidential files: MONETIZATION.md + MARCOM.md (gitignored, not committed)
- .gitignore updated for confidential business files
- HANDOFF.md updated with session state and next steps
2026-08-16 17:48:37 -07:00

53 lines
1.4 KiB
C#

namespace ytLive.Models;
public enum StreamStatus
{
Offline,
Connecting,
Streaming,
Error
}
public class StreamConfig
{
public string Title { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public string StreamKey { get; set; } = string.Empty;
public string IngestUrl { get; set; } = "rtmp://a.rtmp.youtube.com/live2";
public bool IsLowLatency { get; set; } = true;
public int TargetBitrate { get; set; } = 6000;
public int TargetFps { get; set; } = 60;
public string Resolution { get; set; } = "1920x1080";
}
public class StreamHealth
{
public StreamStatus Status { get; set; }
public double CurrentBitrate { get; set; }
public int DroppedFrames { get; set; }
public double FPS { get; set; }
public TimeSpan StreamDuration { get; set; }
public string? LastError { get; set; }
// YouTube-specific (liveStreams.status)
public string? HealthStatus { get; set; } // "good", "ok", "bad", "noData"
public string? HealthMessage { get; set; }
// Report-by-exception (TASK 5 item 3): configurationIssues[] — the banner
// surfaces only warning/error entries.
public List<StreamConfigurationIssue> ConfigurationIssues { get; } = new();
}
public enum StreamIssueSeverity
{
Info,
Warning,
Error
}
public class StreamConfigurationIssue
{
public StreamIssueSeverity Severity { get; set; }
public string? Type { get; set; }
}