From a9b025645b8bd3cf732527ed28c500b760ea86ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Wang?= Date: Tue, 27 Jun 2023 18:20:23 +0200 Subject: [PATCH] Mention cursor constraint explicitly. An example is also added in https://github.com/screen-share/mouse-events/pull/18 fixes #15 --- README.md | 2 +- index.html | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 478e80e..2e903d6 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/index.html b/index.html index 8fa5015..5dffb09 100644 --- a/index.html +++ b/index.html @@ -57,6 +57,8 @@

Use case #2: Efficiency enhancements during RTC

is per-frame IPC overhead which multiplies with the max framerate.

+ The cursor constraint + 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