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

130
Visualizações
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 à 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