mobile : fix home video autoplay + adjust expertise text offset

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-04-04 10:18:01 +02:00
parent 342b6322fb
commit ffeedcdaed
2 changed files with 3 additions and 1 deletions

View file

@ -47,7 +47,8 @@
const wh = window.innerHeight const wh = window.innerHeight
const wrapperRect = textContainer.parentElement.getBoundingClientRect() const wrapperRect = textContainer.parentElement.getBoundingClientRect()
const el = itemEls[currentItem] const el = itemEls[currentItem]
offsetY = wh / 2 - wrapperRect.top - el.offsetTop - el.offsetHeight / 2 - 50 const additionalOffset = window.innerWidth > 800 ? 50 : 0;
offsetY = wh / 2 - wrapperRect.top - el.offsetTop - el.offsetHeight / 2 - additionalOffset
} }
function initVideo() { function initVideo() {

View file

@ -32,6 +32,7 @@
attempt() attempt()
} else { } else {
video.addEventListener('canplay', attempt, { once: true }) video.addEventListener('canplay', attempt, { once: true })
video.load()
} }
} }