diff --git a/src/app.jsx b/src/app.jsx index 2be745a9..c4838d1e 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -107,7 +107,7 @@ async function startStream() { function startVisibility() { const handleVisibilityChange = () => { - if (document.hidden) { + if (document.visibilityState === 'hidden') { const timestamp = Date.now(); store.session.set('lastHidden', timestamp); } else {