Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cropping monitor-captures #1

Open
eladalon1983 opened this issue Mar 29, 2023 · 0 comments
Open

Cropping monitor-captures #1

eladalon1983 opened this issue Mar 29, 2023 · 0 comments

Comments

@eladalon1983
Copy link
Contributor

As it stands, Web applications can use Region Capture to crop tabs, and soon Element Capture too. And these apps wish to give the user control of the captured area, they can - see @beaufortfrancois's demo.

But what about screen-capture? Native applications like Zoom:

  1. Draw a rectangle over the entire screen.
  2. Allow the user to manipulate that rectangle.
  3. Crop the video to the area defined by the rectangle.

image

I don't think Web apps can do anything similar today, and that's a shame. The main missing parts are:

  1. The Web app cannot draw a user-interactive rectangle in arbitrary places on the screen, outside of the Web app's own viewport.
  2. The Web app cannot receive updates of the user's interaction with that rectangle.

The first idea that comes to my mind is:

  1. The browser exposes a new method: drawUserControllableRectange(OnCoordinatesChangedCb callback)
  2. The Web app calls this and provides a callback.
  3. The browser draws a rectange to the screen.
  4. Whenever the user moves the rectangle or resizes it, the Web app receives the new coordinates via the callback.
  5. The Web app uses mediacapture-transform to crop the frames in accordance with the user's request.

cc @fideltian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant