Maybe visibilityState is more reliable

This commit is contained in:
Lim Chee Aun 2022-12-26 17:39:20 +08:00
parent fb09e94615
commit 082a04c30c

View file

@ -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 {