Closed ipnet-me closed 3 years ago
I got it myself
just changed function
function appendNextSegment(){
// reset the 'data' event listener to just append (moof/mdat) boxes to the Source Buffer
transmuxer.off('data');
transmuxer.on('data', (segment) =>{
sourceBuffer.appendBuffer(new Uint8Array(segment.data));
})
if (segments.length == 0){
// notify MSE that we have no more segments to append.
mediaSource.endOfStream();
}
if(segments.length>0){
fetch(segments.shift()).then((response)=>{
return response.arrayBuffer();
}).then((response)=>{
transmuxer.push(new Uint8Array(response));
transmuxer.flush();
})
}
}
Hello,
I am trying very basic example player from your docs.
https://github.com/videojs/mux.js/#basic-usage
It working perfect with 3 segments, but If I add 4 or more segments I got error.
Uncaught (in promise) DOMException: Failed to execute 'appendBuffer' on 'SourceBuffer': This SourceBuffer is still processing an 'appendBuffer' or 'remove' operation.
I can't find issue, anyone can help me?
Thanks
segments.zip
this is video segments I am trying to play