mobile : fix home video autoplay + adjust expertise text offset
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
342b6322fb
commit
ffeedcdaed
2 changed files with 3 additions and 1 deletions
|
|
@ -47,7 +47,8 @@
|
|||
const wh = window.innerHeight
|
||||
const wrapperRect = textContainer.parentElement.getBoundingClientRect()
|
||||
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() {
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
attempt()
|
||||
} else {
|
||||
video.addEventListener('canplay', attempt, { once: true })
|
||||
video.load()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue