Re: [mediacapture-record] Add replaceStream to MediaRecorder (#186)


> Also, with `replaceTrack` there's inherently no way to add additional tracks to a recording, whereas with `replaceStream` you'd be forgiven for not knowing that this limitation exists (it's in the prose).

If gather the statement context correctly, yes there is. Given the case of recording multiple tracks at a single `<video>` element from `HTMLVideElement.captureStream()` execute `captureStream()` at a before any playback begins, when `src` of `<video>` is changed the `MediaStreamTrack`s from the new media source are added to the original `MediaStream` from `captureStream()` and `addtrack` event is dispatched, where within the event handler `replaceTrack()` can be executed for each audio or video track, a 1:1 swap for new track:original track N times, where the `MediaStream` contains at most two tracks throughout the process

GitHub Notification of comment by guest271314
Please view or discuss this issue at using your GitHub account

Received on Monday, 16 September 2019 23:51:48 UTC