Add media session controls

This commit is contained in:
lucast committed 2026-09-26 22:18:33 +02:00
1 parent 5e3f3ef6a2
commit b5f7aa1372
2 files changed
+139 -19

No files matched your search

+7
View File
@@ -15,11 +15,18 @@ onMounted(() => {
mouseMovedRecently.value = false
}, 2000)
}
const handleKeydown = (event: KeyboardEvent) => {
if (event.key === "Escape" && fullscreen.value) {
closeFullscreen()
}
}
window.addEventListener("mousemove", handleMouseMove)
window.addEventListener("keydown", handleKeydown)
onUnmounted(() => {
window.removeEventListener("mousemove", handleMouseMove)
window.removeEventListener("keydown", handleKeydown)
})
})