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

101
Views
Cómo buscar video cuando se reproduce desde MediaSource

Seguí esta guía: https://github.com/nickdesaulniers/netfix/blob/gh-pages/demo/bufferWhenNeeded.html

Cuando el usuario selecciona un punto de reproducción en la barra de progreso.

llamará a seek () para devolver los datos correspondientes y luego agregará los datos a sourceBuffer,

 function seek(e) { const start = (Math.round((totalFileSize / video.duration) * video.currentTime)); const end = (start + Math.round(start / 5)); fetchRange(assetURL, start, end); }; function fetchRange(url, start, end) { var xhr = new XMLHttpRequest; xhr.open('get', url); xhr.responseType = 'arraybuffer'; xhr.setRequestHeader('Range', 'bytes=' + start + '-' + end); xhr.onload = function () { console.log('fetched bytes: ', start, end); bytesFetched += end - start + 1; sourceBuffer.appendBuffer(chunk); }; xhr.send(); };

sin embargo, siempre recibo un error:

" Failed to execute 'appendBuffer' on 'SourceBuffer': The HTMLMediaElement.error attribute is not null ".

Realmente busque mucho pero no pude resolverlo,

Estoy muy agradecido de que alguien pueda ayudar.

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!