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

227
Visualizações
Stop "loading" video if not in viewport

Let's say I have 30 high quality videos on my page and my bandwidth is limited. Once the page is opened, I quickly scroll to the 20th video and I'm trying to watch it. Currently, that video is the only video in my viewport. So right now, I don't want my browser to "load" other videos. Because otherwise it will waste my bandwidth, and it will probably cause buffering issues in the 20th video. (the video I'm trying to watch now)

But If I can somehow stop "loading" the other videos, then browser can use all it's bandwidth in the 20th video, and then I will be able to watch the video without buffering.

To make it clear, I'm not talking about playing/pausing videos, I'm talking about "loading" the playback. I want it to stop if the video is not in viewport.

Is it possible?

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

0

use preload attribute in your video tag and set it to none.

<video controls preload="none" poster="video-poster.jpg">
  <source src="video-name.webm" type="video/webm">
  <source src="video-name.mp4" type="video/mp4">
</video>
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