Re: [mediacapture-record] Add method MediaRecorder.restart considering this use case. (#178)

@Pehrsons thanks for solution! I duplicate your answer here:
> Very cool, I got a chance to play with MSE a bit. With mode "sequence" on the SourceBuffer it works as expected with subsequent recordings/chunks.
> See https://codesandbox.io/s/record-play-case-3r40c -- Start starts a recording, Stop stops it. Restart Stops then Starts in the same task. So if you Stop, the audio element will play what is buffered and then stall, if you again Start it will continue anew. Restart reveals a tiny bit of a glitch but in general it works well.

If we consider my example of the changes that are needed to fix
Fixed sandbox: https://codesandbox.io/s/record-play-case-2-q7foo
1) for Firefox: add `{ mimeType: "audio/webm;codecs=opus" }` option for MediaRecorder(line 15 of my example)
2) set `sourceBuffer.mode = "sequence";` (line 40)

@titoBouzout This is the solution to this problem. I did not check it for sagging. I can not yet verify the viability of this solution to this issue. Write me about the results of use, whatever they are

-- 
GitHub Notification of comment by utyfua
Please view or discuss this issue at https://github.com/w3c/mediacapture-record/issues/178#issuecomment-566961124 using your GitHub account

Received on Wednesday, 18 December 2019 09:57:38 UTC