fix(visualizer): full-width spectrum + device pick auto-starts capture
Spectrum width - grid-auto-flow: column with implicit columns wasn't reliably stretching to fill the parent. Switch to explicit grid-template-columns: repeat(var(--spectrum-bars), minmax(0, 1fr)) with the bar count exposed as a CSS variable from JS so the column count and the actual bar count stay in sync. - !important on display/grid-template-columns/width to defeat any legacy descendant rules. Device selection - Picking a device in the audio-device dropdown is an explicit signal that the user wants capture. Auto-enable the visualizer if it isn't already on, then call applyVisualizerMode so the WS subscription happens and the badge flips from 'Available' to 'Active'. Was only doing this when visualizer was already on, which is why the user kept seeing 'Available, not capturing'.
This commit is contained in:
@@ -6867,21 +6867,20 @@ body.visualizer-active .now-playing .spectrogram-canvas {
|
||||
|
||||
/* ─── Spectrum bars (JS-injected; real audio from backend FFT) ── */
|
||||
.now-playing .spectrum {
|
||||
/* Grid with explicit equal-width columns guarantees each bar
|
||||
claims its share of the full container width, regardless of
|
||||
the bar count. */
|
||||
display: grid;
|
||||
/* Explicit equal-width columns. The CSS variable --spectrum-bars
|
||||
is set by JS so adding/removing bars stays in sync. */
|
||||
display: grid !important;
|
||||
grid-template-columns: repeat(var(--spectrum-bars, 40), minmax(0, 1fr)) !important;
|
||||
grid-auto-flow: column;
|
||||
grid-auto-columns: 1fr;
|
||||
align-items: end;
|
||||
column-gap: 4px;
|
||||
height: 70px;
|
||||
margin: 36px 0 24px;
|
||||
width: 100%;
|
||||
width: 100% !important;
|
||||
box-sizing: border-box;
|
||||
min-width: 0;
|
||||
}
|
||||
.now-playing .spectrum span {
|
||||
.now-playing .spectrum > span {
|
||||
display: block;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
|
||||
Reference in New Issue
Block a user