• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

150
Vistas
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 3 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

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 3 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda