w3c / mediacapture-region

This document introduces an API for cropping a video track derived from display-capture of the current tab.
http://w3c.github.io/mediacapture-region/
Other
40 stars 10 forks source link

Initial state of cloned tracks #65

Open eladalon1983 opened 2 years ago

eladalon1983 commented 2 years ago

The spec currently reads:

clone() When a BrowserCaptureMediaStreamTrack is cloned, the user agent MUST produce a track which is initially uncropped, regardless of the crop-state of the original track.

Rethinking this, I don't see how that serve Web developers. The most natural thing to do when cloning is to clone as much of the state as possible - that's what a developer would expect.

If a developer wishes to hand off an uncropped version of the track, they can do the following:

const clonedTrack = track.clone();
await track.cropTo();
// Hand it off.
youennf commented 2 years ago

That seems reasonable. This would need a change in the way we do cloning, which will be made easier once we merge https://github.com/w3c/mediacapture-main/pull/873.