lock wake for all browsers but firefox

This commit is contained in:
Sara
2023-09-26 15:33:26 +02:00
parent 98ddd64114
commit 1ce382a454
2 changed files with 36 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faGear } from "@fortawesome/free-solid-svg-icons";
import About from "../../(aboutAndPrivacy)/about";
import Privacy from "../../(aboutAndPrivacy)/privacy";
import { lockWakeState, releaseWakeState } from "../../lib/wakeLock";
const TranscriptCreate = () => {
const [stream, setStream] = useState<MediaStream | null>(null);
@@ -45,6 +46,13 @@ const TranscriptCreate = () => {
} = useAudioDevice();
const [hasRecorded, setHasRecorded] = useState(false);
useEffect(() => {
lockWakeState();
return () => {
releaseWakeState();
};
}, []);
return (
<>
{permissionOk ? (