wake lock on start game

This commit is contained in:
Viktor Rådberg
2023-09-17 18:17:13 +02:00
parent 444d4086aa
commit 10b40c5ca2
6 changed files with 69 additions and 14 deletions

9
src/Types/WakeLock.ts Normal file
View File

@@ -0,0 +1,9 @@
type WakeLockType = 'screen';
export type WakeLock = {
isSupported: boolean;
request: (type?: WakeLockType) => Promise<void>;
active: boolean;
release: () => Promise<void>;
type: 'screen' | undefined;
};