[mediacapture-region] Should cropTo(undefined) reject if track not cropped? (#60)

eladalon1983 has just created a new issue for https://github.com/w3c/mediacapture-region:

== Should cropTo(undefined) reject if track not cropped? ==
Consider this code:
```js
const stream = await navigator.mediaDevices.getDisplayMedia(); 
const [track] = stream.getVideoTracks();
track.cropTo(undefined);
```
The track was never cropped, yet the app asks for it to be uncropped. What should happen now?

The spec says:
> If [this](https://webidl.spec.whatwg.org/#this) track is [uncropped](https://w3c.github.io/mediacapture-region/#dfn-uncropped), the user agent MUST only accept [valid CropTargets](https://w3c.github.io/mediacapture-region/#dfn-valid-croptarget).

Looking at it again, this seems to me counterproductive. Consider an application that has shuffled the track around some layers. Maybe the new layer does not wish to poll other layers for state, and just wants to ensure the track is not cropped by calling `cropTo(undefined)`. It seems to me more developer-friendly to allow this.

Please view or discuss this issue at https://github.com/w3c/mediacapture-region/issues/60 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 5 June 2022 19:09:00 UTC