feat: force landscape on fullscreen

This commit is contained in:
ThaUnknown 2023-11-15 01:09:28 +01:00
parent 80050fa6e1
commit 8b992cb779

View file

@ -100,6 +100,11 @@
// document.fullscreenElement isn't reactive
document.addEventListener('fullscreenchange', () => {
isFullscreen = !!document.fullscreenElement
if (document.fullscreenElement) {
screen.orientation.lock('landscape')
} else {
screen.orientation.unlock()
}
})
function handleHeaders () {