I have two Uint8Arrays. The first contains the video and the second the audio data. For now, I save both of them using blob. I poorly was unable to find any explanation on how to save them in one file.
Can somebody provide a code example?
Thanks
Edit: comment to Matt Ellens request I moved here for better readability Unfortunately not. I tried to assemble a function myself.
var blob1 = new Blob([arrayConcat(video)], {
type: 'application/octet-stream'
});
var blob2 = new Blob([arrayConcat(audio)], {
type: 'application/octet-stream'
});
stream = new MediaStream();
stream.addTrack(arrayConcat(video));
stream.addTrack(arrayConcat(audio));
console.log(stream);
It always says that I need a MediaStreamTrack if I want to add a Track. I was then searching and found this: Is there a way to create your own mediaStreamTrack using say, JSON objects?. It seems like Tracks are only for webcam and user micro because they are created by the browser.