fix: wakelock

This commit is contained in:
Timothy J. Baek 2024-06-24 11:29:21 -07:00
parent 1c4e7f0324
commit f6082579c9

View File

@ -60,10 +60,13 @@
console.log(err);
}
wakeLock.addEventListener('release', () => {
// the wake lock has been released
console.log('Wake Lock released');
});
if (wakeLock) {
// Add a listener to release the wake lock when the page is unloaded
wakeLock.addEventListener('release', () => {
// the wake lock has been released
console.log('Wake Lock released');
});
}
};
if ('wakeLock' in navigator) {