30 lines
1.7 KiB
C#
30 lines
1.7 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace DeepDrftPublic.Client.Common;
|
|
|
|
/// <summary>
|
|
/// The single public-site listener-settings object (Phase 18 wave 18.6, §4a). The generalized analogue of
|
|
/// <see cref="DarkModeSettings"/>: one scoped holder for every remembered listener preference, seeded at
|
|
/// server prerender, carried into WASM via <see cref="PersistentState"/>, and persisted to a cookie on
|
|
/// change. Today it carries one preference — streaming quality; tomorrow dark mode (and whatever follows)
|
|
/// folds in here as another property without disturbing the menu that reads it.
|
|
/// <para>
|
|
/// Built design-for-adaptability per §4a: a new preference is a new <c>[PersistentState]</c> property here
|
|
/// plus a new <see cref="Components.SettingsItem"/> in the menu — not a rewire. Dark mode is intentionally
|
|
/// <em>not</em> migrated in now (it keeps its own <see cref="DarkModeSettings"/> seam); this object is shaped
|
|
/// so that consolidation is later a merge of two identical seams, not a reconciliation of two different ones.
|
|
/// </para>
|
|
/// </summary>
|
|
public class PublicSiteSettings
|
|
{
|
|
/// <summary>
|
|
/// The listener's streaming-quality preference. Defaults to <see cref="StreamQuality.LowData"/> (Opus,
|
|
/// capability-gated — OQ2). Seeded from the <c>streamQuality</c> cookie at prerender; persisted on change
|
|
/// by the client cookie service. The player reads this to decide which <c>?format=</c> to request, but
|
|
/// the capability gate and C2 fallback still apply on top, so a <see cref="StreamQuality.LowData"/>
|
|
/// preference never forces an unplayable stream.
|
|
/// </summary>
|
|
[PersistentState]
|
|
public StreamQuality StreamQuality { get; set; } = StreamQuality.LowData;
|
|
}
|