W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > September 2019

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

From: guest271314 via GitHub <sysbot+gh@w3.org>
Date: Mon, 16 Sep 2019 23:51:47 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-532001088-1568677905-sysbot+gh@w3.org>
@jan-ivar 

> 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 https://github.com/guest271314/MediaFragmentRecorder/blob/webrtc-replacetrack-htmlmediaelement-capturestream-addtrack/MediaFragmentRecorder.html.



-- 
GitHub Notification of comment by guest271314
Please view or discuss this issue at https://github.com/w3c/mediacapture-record/pull/186#issuecomment-532001088 using your GitHub account
Received on Monday, 16 September 2019 23:51:48 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:22:28 UTC