Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

229
Visualizações
How to defer after the fold video load after page loads in React/NextJS

I'm trying to up my lighthouse scores by loading a video after the page has fully loaded. It's after the fold and will not be seen until scroll so I want it to load everything on the page first so it can get a quick FCP and then load the video after everything.

This doesn't seem to work in terms of upping my Lighthouse score...

export default function AboutUs() {
  const [loadVideos, setLoadVideos] = useState(false)

  useEffect(() => {
    setLoadVideos(true)
  }, [])

   .....etc etc.....

    {loadVideos && (
          <video
            autoPlay
            muted
            playsInline
            loop
            preload="none"
            poster="/images/charge_poster.jpg"
          >
            <source src="/videos/charge.mp4" type="video/mp4" />
          </video>
        )}
   ..Closing tags etc

Is there a better way? I don't want to load on scroll cause then the video will have to load when they are already there. Just load after HTML, CSS and Images preferably.

Thanks

enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The preload attribute is ignored if autoplay is present.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda