Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

179
Views
Un error al transmitir video nodejs-aws

Tengo un archivo de video en aws s3 e intento transmitirlo al cliente a través de un servidor nodejs-express. este es mi código de fondo

 const S3 = require('aws-sdk/clients/s3'); const accessKeyId = process.env.AWS_ACCESS_KEY const secretAccessKey = process.env.AWS_SECRET_KEY const region = process.env.AWS_BUCKET_REGION const bucketName = process.env.AWS_BUCKET_NAME const s3 = new S3({ region, accessKeyId, secretAccessKey, }) function getFileStream(fileKey) { const downloadParams = { Key: fileKey, Bucket: bucketName } return s3.getObject(downloadParams).createReadStream(); } async function getFileSize(fileKey) { const fileParams = { Key: fileKey, Bucket: bucketName } const data = await s3.headObject(fileParams).promise(); return data.ContentLength; } router.get("/test-video-stream", async (req, res) => { const fileName = 'test-video'; const fileSize = await getFileSize(fileName); const headers = { "Content-Range": `bytes 0-${fileSize}`, "Accept-Ranges": "bytes", "Content-Type": "video/mp4", }; res.writeHead(200, headers) const fileStream = getFileStream(fileName); fileStream.pipe(res); })

y este es mi codigo front-end

 <video width="320" height="240" controls=""> <source type="video/mp4" src="http://localhost:8000/test-video-stream"> </video>

Puedo reproducir el video desde la hora de inicio 0:00 pero no puedo hacer clic en la barra de control de tiempo del reproductor de video para elegir la hora de inicio de la reproducción del video. ¿Alguien puede explicarme por qué sucede esto? Muchas gracias !

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!