diff --git a/public/app.js b/public/app.js index 1cb6524..2a8d582 100644 --- a/public/app.js +++ b/public/app.js @@ -56,7 +56,7 @@ function applyStoredWatchHeight() { if (savedHeight > 0) { stage.style.setProperty("--watch-panel-height", `${savedHeight}px`); } - setWatchCollapsed(localStorage.getItem(watchCollapsedStorageKey) === "true"); + setWatchCollapsed(true); } function setWatchCollapsed(collapsed) { @@ -327,9 +327,14 @@ async function applyWatchState(state) { if (!currentYoutubeVideoId) { youtubePlayer?.stopVideo?.(); youtubeShell.classList.remove("is-active"); + setWatchCollapsed(true); return; } + if (state.playing) { + setWatchCollapsed(false); + } + youtubeShell.classList.add("is-active"); const player = await ensureYoutubePlayer(); applyingWatchStateUntil = Date.now() + 1200;