W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > June 2022

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

From: Elad Alon via GitHub <sysbot+gh@w3.org>
Date: Mon, 06 Jun 2022 11:36:03 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-1147352739-1654515360-sysbot+gh@w3.org>
> It makes sense to me to not reject.

Great. I'll send a PR.

> Also, maybe there should be a CropTarget getter since cropTo is nothing but an asynchrony setter.

I really want to just say "yes" and build forward momentum, but I think we could start a separate discussion for this. It's not necessarily as simple as it initially sounds. See here:
const stream = await getDisplayMedia();
const [track] = stream.getVideoTracks();
console.log(`${track.getCropTarget()}`);  // Presumably prints `undefined`?
track.cropTo(t1);  // Note lack of `await`.
track.cropTo(t2);  // Note lack of `await`.  
console.log(`${track.getCropTarget()}`);  // Unclear what's printed...? undefined? t1? t2?

GitHub Notification of comment by eladalon1983
Please view or discuss this issue at https://github.com/w3c/mediacapture-region/issues/60#issuecomment-1147352739 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 6 June 2022 11:36:05 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:57 UTC