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

129
Vistas
node.js get part of a stream
const headers =  {
      'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36',
    }

headers['range'] = `bytes=${67638}-${91638920}`


    const stream = await axios.get(url, {
      responseType: 'stream',
      headers,
    }).then(s => {
      return s.data;
    });

 response.writeHead(206, {
          'Content-Type': 'audio/mpeg',
          'Accept-Ranges': 'bytes',
          'Content-Range': 'bytes ' + 67638 + '-' + 91638920 + '/' + 91638921,
          'Content-Length': 91638921,
        });
        stream.pipe(response);

I want to get the streaming part of an audio file. The result I want. I paste the address into the browser and the audio player opens and playback starts, but not from the first second For example, from 10 sec. That is, the player slider should be immediately at 10 seconds

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