#video chunk from backend in media recorder is not displaying (please help I am lost)

9 messages · Page 1 of 1 (latest)

floral ridge
#

This function gets video chunk
function registerPlayer(mediaSource) {
const videoBuffer = mediaSource.addSourceBuffer('video/webm;codecs=vp8');
let countDownloadChunk = 0

setInterval(() => {
    fetch(/main/get/${STREAM_NAME}/${countDownloadChunk})
        .then((response) => {
            if (response.status !== 200) {
                throw Error('no such file')
            }
            return response
        }).then((buffer) => {
            countDownloadChunk++
            videoBuffer.appendBuffer(buffer)
        }).catch(() => {})
}, 2000)

}
Then I call this function and set video.src
function processStream(stream, mediaSource) {
registerRecord(stream)
registerPlayer(mediaSource)
}

video.src = URL.createObjectURL(mediaSource);
navigator.mediaDevices.getUserMedia({
video: true,
}).then((stream) => {processStream(stream, mediaSource)});

#

video chunk from backend in media recorder is not displaying (please help I am lost)

novel shuttle
#

Does it print any errors

floral ridge
floral ridge
floral ridge
thorn sphinx
#

hm

sacred smelt