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.