diff --git a/frontend/src/modals/SetlistPresent.vue b/frontend/src/modals/SetlistPresent.vue index 0f79e80..6d5093c 100644 --- a/frontend/src/modals/SetlistPresent.vue +++ b/frontend/src/modals/SetlistPresent.vue @@ -210,7 +210,7 @@ import { injectStrict, hkBackKey, hkCancelKey, hkDownKey, hkForwardKey, hkHideKe import 'vue3-carousel/dist/carousel.css'; import { Carousel, Slide, type CarouselExposed } from 'vue3-carousel'; import { logicOr } from '@vueuse/math'; -import { whenever } from '@vueuse/core'; +import { useWakeLock, whenever } from '@vueuse/core'; import { ref, computed, watch, onMounted, onUnmounted, nextTick, type PropType } from 'vue'; import { useI18n } from 'vue-i18n'; import type { SetlistSongPresentation } from '@/definitions'; @@ -363,6 +363,13 @@ watch (() => props.remoteHide, (val: boolean) => { } }); +// keep the screen awake while presenting +const { request: requestWakeLock, release: releaseWakeLock } = useWakeLock(); +watch(() => props.active, (isActive) => { + if (isActive) requestWakeLock('screen'); + else releaseWakeLock(); +}, { immediate: true }); + // handle mount / unmount hooks onMounted(() => { // alternate colon visibility of clock each second diff --git a/frontend/src/modals/SongPresent.vue b/frontend/src/modals/SongPresent.vue index 58b0a62..77e6105 100644 --- a/frontend/src/modals/SongPresent.vue +++ b/frontend/src/modals/SongPresent.vue @@ -47,7 +47,7 @@