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

Captured Mouse Events #233

Open
eladalon1983 opened this issue Jul 19, 2023 · 0 comments
Open

Captured Mouse Events #233

eladalon1983 opened this issue Jul 19, 2023 · 0 comments
Labels
from: Google Proposed, edited, or co-edited by Google.

Comments

@eladalon1983
Copy link

eladalon1983 commented Jul 19, 2023

WebKittens

@youennf

Title of the spec

Captured Mouse Events

URL to the spec

https://screen-share.github.io/captured-mouse-events/

URL to the spec's repository

https://github.com/screen-share/captured-mouse-events/

Issue Tracker URL

No response

Explainer URL

https://github.com/screen-share/captured-mouse-events/blob/main/README.md

TAG Design Review URL

w3ctag/design-reviews#872

Mozilla standards-positions issue URL

mozilla/standards-positions#850

WebKit Bugzilla URL

No response

Radar URL

No response

Description

Web applications can use getDisplayMedia() to capture any display-surface - tabs, windows or screens. When they do, they can also specify the cursor constraint to control whether the cursor's pixels are captured or not.

But what if the application wishes to programmatically observe the location of the cursor? That can be done by scanning each frame and employing heuristics to detect the cursor. But that's neither simple, nor efficient, nor robust.

To that end, we propose a mechanism for exposing mouse coordinates over a captured surface to a capturing application.

The TL;DR is that we expose an oncapturedmousechange EventHandler on CaptureController. Events are of the general shape {surfaceX: long, surfaceY: long}, exposing the coordinates of the mouse relative to the origin of the captured surface.

@lukewarlow lukewarlow added the from: Google Proposed, edited, or co-edited by Google. label Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from: Google Proposed, edited, or co-edited by Google.
Projects
None yet
Development

No branches or pull requests

2 participants