Maybe visibilityState is more reliable
This commit is contained in:
parent
fb09e94615
commit
082a04c30c
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue