Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

116
Vistas
Upload the video to the buffer, then change the src attribute
<video id=video controls mute></video>
<script>
    
    let source = new MediaSource,
    buffer = MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');

    (xhr = new XMLHttpRequest).open('get', 'frag_bunny.mp4');
    xhr.responseType = 'arraybuffer';
    xhr.onload = _ => {
        buffer.onupdateend = _ => {
            source.endOfStream();
            video.src = URL.createObjectURL(source);
            video.muted = true;
            video.play();
        };
        buffer.appendBuffer(xhr.response);
    }
    xhr.send();

 </script>

The code is not working. I really need your help

I am looking for a solution in which it is possible to preload a video file to the buffer. At the same time, change the src attribute of the video when the video is in the buffer. That is, upload a video and then insert or change the src attribute of the current video in the document. Is it possible to implement such a thing?

about 4 years ago · Juan Pablo Isaza
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 Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda