From b1555058287f858d906b4db9415ced22279c4594 Mon Sep 17 00:00:00 2001 From: Jure <44338+hoornet@users.noreply.github.com> Date: Sat, 4 Apr 2026 19:07:49 +0200 Subject: [PATCH] Stop media playback when navigating between views Subscribe to view changes in UI store and pause all video/audio elements inside
when the view switches. Prevents double audio when opening a thread from a note with playing video. Podcast player audio is outside
and unaffected. --- src/stores/ui.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/stores/ui.ts b/src/stores/ui.ts index b9cb46a..23408bb 100644 --- a/src/stores/ui.ts +++ b/src/stores/ui.ts @@ -127,3 +127,16 @@ export const useUIStore = create((set, _get) => ({ toggleHelp: () => set((s) => ({ showHelp: !s.showHelp })), toggleDebugPanel: () => set((s) => ({ showDebugPanel: !s.showDebugPanel })), })); + +// Pause all in-page media (video/audio) when navigating between views +// This prevents background playback when opening thread from feed, etc. +// Note: the podcast player