Feat : Change quality
All checks were successful
release / build (push) Successful in 25s
release / verify-windows (push) Successful in 1m14s

This commit is contained in:
jeanotx32
2026-08-12 04:55:56 +02:00
parent ea8eeec129
commit d14369a914
6 changed files with 225 additions and 2 deletions

View File

@@ -44,6 +44,8 @@ const EVENT_STYLES: Record<AgentEvent, EventStyle> = {
'watch.failed': { icon: '!', tone: 'warn' },
'fullscreen.restored': { icon: '⛶', tone: 'ok' },
'fullscreen.failed': { icon: '⛶', tone: 'warn' },
'quality.selected': { icon: '◆', tone: 'ok' },
'quality.failed': { icon: '◆', tone: 'warn' },
'browser.opened': { icon: '⊞', tone: 'info' },
'browser.closed': { icon: '⊟', tone: 'offline' },
'browser.imported': { icon: '⇄', tone: 'ok' },
@@ -68,7 +70,7 @@ type FilterId = (typeof FILTERS)[number]['id'];
const FILTER_PREFIXES: Record<Exclude<FilterId, 'all' | 'issues'>, string[]> = {
record: ['record.', 'capture.', 'stream.'],
obs: ['obs.', 'preset.', 'config.'],
watch: ['watch.', 'fullscreen.', 'browser.'],
watch: ['watch.', 'fullscreen.', 'browser.', 'quality.'],
};
function matches(entry: LogEntry, filter: FilterId): boolean {

View File

@@ -110,6 +110,13 @@ export function AgentSettings({ agent, targets, onClose, onCommand, notify }: Pr
setWatch((current) => ({ ...current, fullscreen: { ...current.fullscreen, ...patch } }));
}
function patchStreamQuality(patch: Partial<WatchSettings['streamQuality']>) {
setWatch((current) => ({
...current,
streamQuality: { ...current.streamQuality, ...patch },
}));
}
/**
* Applique le preset actuellement sélectionné, enregistré ou non : c'est un
* essai, on veut voir le compte rendu avant de figer le choix.
@@ -736,6 +743,39 @@ export function AgentSettings({ agent, targets, onClose, onCommand, notify }: Pr
Tester le plein écran
</button>
</div>
{browser.mode === 'bidi' && (
<>
<label className="checkbox">
<input
type="checkbox"
checked={watch.streamQuality.enabled}
onChange={(event) => patchStreamQuality({ enabled: event.target.checked })}
/>
<span>
Sélectionner la meilleure qualité du lecteur à l'ouverture de chaque stream
<span className="muted small">
{' '}
— Stripchat ne démarre pas toujours sur son maximum disponible.
</span>
</span>
</label>
{watch.streamQuality.enabled && (
<label className="field small-field">
<span>Délai avant réglage (s)</span>
<input
value={String(Math.round(watch.streamQuality.delayMs / 1000))}
onChange={(event) =>
patchStreamQuality({ delayMs: (Number(event.target.value) || 0) * 1000 })
}
inputMode="numeric"
/>
<span className="muted small">Le temps que le lecteur s'initialise.</span>
</label>
)}
</>
)}
</fieldset>
<div className="danger-zone">