You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: