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

Mention cursor constraint explicitly. #19

Merged
merged 1 commit into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Screen-Capture Mouse Events

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.
When they do, they can also specify the [cursor constraint](https://www.w3.org/TR/screen-capture/#dfn-cursor) 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.
Expand Down
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ <h3>Use case #2: Efficiency enhancements during RTC</h3>
is per-frame IPC overhead which multiplies with the max framerate.
</p>
<p>
The <a data-cite="screen-capture/#dfn-cursor">cursor constraint</a>
can be used to omit the cursor from the captured frames.
If mouse coordinates were known to the encoding application, it could transmit these
coordinates to the receiving application (on another device). The receiver could then
redraw a cursor on the other side. (Note that, depending on the decoder, this is likely
Expand Down