fix: previews follow the app volume; volume bar fill always accent

The preview backend never received a volume — clips played at the crate
default (0.7) regardless of the slider, even muted. The session now sets
the preview volume from the app store (mute → 0) before the first load and
mirrors it live while the modal is open; the debug overlay's PREVIEW row
exposes the backend's resting volume as proof.

The player-bar volume (and fallback seek) fill is now always the accent
color — matching the waveform scrubber's played region — stepping up to
the hover shade on hover instead of white-until-hover.

Also syncs package-lock to the soulstream name + alpha version.
This commit is contained in:
KeelrLeek committed 2026-07-23 16:25:42 -05:00
1 parent 793f78370e
commit 691fdcdc9a
10 files changed
+63 -10

No files matched your search

+8
View File
@@ -30,6 +30,7 @@ let service = null;
let unsubscribe = null;
let focusParts = null; // { coordinator, gateway }
let demoTicker = null;
let readPlayerRef = null; // injected with the bridge; app volume source
// ------------------------------------------------------------- gateway ----
@@ -50,6 +51,7 @@ export function notePlaybackGeneration() {
/** One-time wiring from state.svelte.js. */
export function initPreviewBridge({ readPlayer, resumeMain }) {
readPlayerRef = readPlayer;
focusParts = createProductionFocus({
readPlayer,
readPlaybackGeneration: () => playbackGeneration,
@@ -81,6 +83,11 @@ export async function openPreview(manifest, { playFull } = {}) {
focus: focusParts,
})
);
// Preview volume follows the APP volume (mute = 0) — set it BEFORE the
// first load so the opening clip can't blast at the backend default.
// The overlay keeps it mirrored live while the modal is open.
const p = readPlayerRef?.();
if (p) service.setVolume(p.muted ? 0 : (p.volume ?? 0.7));
previewUi.open = true;
await service.open({ sessionId: crypto.randomUUID(), manifest });
}
@@ -176,4 +183,5 @@ export const previewCommands = {
seek: (ms) => service?.seek(ms),
setMuted: (v) => service?.setMuted(v),
playFullTrack: (starter) => service?.playFullTrack(starter),
setVolume: (v) => service?.setVolume(v),
};