w3ctag / design-reviews

W3C specs and API reviews
Creative Commons Zero v1.0 Universal
318 stars 55 forks source link

Captured Mouse Events #872

Closed eladalon1983 closed 2 weeks ago

eladalon1983 commented 11 months ago

Hej!

I'm requesting a TAG review of Captured Mouse Events.

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.

Further details:

We'd prefer the TAG provide feedback as: 🐛 open issues in our GitHub repo for each point of feedback

atanassov commented 11 months ago

Hi @eladalon1983, looking at the proposal with @hober during our Aug 23 f2f, we have the following questions:

  1. What is the expected behavior for OSs that have no cursor - iOS, Android etc.?
  2. The intended effect assumes that the receiving UA will have the ability to change the lower layer OS cursors effects - is this possible? (For instance, we suspect this would be very diffcult on Windows.)
  3. It is unclear how this feature will be available in different pixel densities, DPI, frame sizes etc.
  4. What other alternatives have you considered?
  5. How does this featuere interact with the a11y stack given they usually have thier own virutal cursor?
  6. Not a question but suggestion - we assumed that the spec is your explainer given the little information provided in the README that is linked as an explainer. Can you consolidate please?
eladalon1983 commented 10 months ago
  1. What is the expected behavior for OSs that have no cursor - iOS, Android etc.?

Invisible "pointers" (touch, stylus) present a different security/privacy profile, because (a) they were not previously exposed to the capturing application, and (b) they involve exposing additional information that is similar to mouse-clicks. As such, they are outscoped, and we don't have concrete plans to extend the API to support them. (However, it seems like it will be possible if desired in the future, although likely subject to some additional permissions prompt.)

  1. The intended effect assumes that the receiving UA will have the ability to change the lower layer OS cursors effects - is this possible? (For instance, we suspect this would be very diffcult on Windows.)

Changing the lower layer OS cursor is NOT required for any of the use-cases discussed. Rather, it is assumed that it is possible to exclude the OS cursor from capture. It is then straightforward to draw a custom cursor into the video that is either transmitted remotely or saved to disk. The local user would sitll see their own natural cursor locally; augementation for the local user is not part of the use-case discussed.

  1. It is unclear how this feature will be available in different pixel densities, DPI, frame sizes etc.

Could you please help me understand the challenge here? Is it that the specification does not currently clarify whether the coordinates are used in terms of the captured frame's "pixel-space", running from (0, 0) to (max_x, max_y) as defined by MediaStreamTrack.getSettings().width and MediaStreamTrack.getSettings().height?

  1. What other alternatives have you considered?

Exposure on the frames themselves rather than using dedicated events. This alternative is seen as complementary, and might be pursued in the future. The downside is that the frequency of the video might be quite low. For example, assume you want to capture at 5fps but render a smooth-looking video remotely by updaitng the cursor at 30fps.

  1. How does this featuere interact with the a11y stack given they usually have thier own virutal cursor?

I think it should be up to the UA to decide whether, on the given platform with its particular implementation-limitations for the specific virtual cursor, the virtual cursor is treated as the real cursor, or is ignored.

  1. Not a question but suggestion - we assumed that the spec is your explainer given the little information provided in the README that is linked as an explainer. Can you consolidate please?

If @fred-wang does not pick it up first, I can do so when I have more time to devote to this project.

rhiaro commented 5 months ago

Hi, have you had any time to make an explainer which is more in line with our explainer guidance?

hober commented 5 months ago
  1. What is the expected behavior for OSs that have no cursor - iOS, Android etc.?

Invisible "pointers" (touch, stylus) present a different security/privacy profile, because (a) they were not previously exposed to the capturing application, and (b) they involve exposing additional information that is similar to mouse-clicks. As such, they are outscoped, and we don't have concrete plans to extend the API to support them. (However, it seems like it will be possible if desired in the future, although likely subject to some additional permissions prompt.)

Instead of outscoping & having bare surfaceX/Y attributes on the event, why not have single attribute that contains an array of x,y pairs? That way you don't have to do any work up-front for any of the N != 1 cases, but you're future-proofed for those cases if they do arise.

matatk commented 5 months ago

This spec presents a great opportunity for improving accessibility (as is alluded to in the text of the spec) - it would be great to highlight this by way of including an "Accessibility considerations" section, where this can be explicitly discussed. Also it would be a good idea to get an accessibility review from the Accessible Platform Architectures (APA) WG, who could help with drafting the suggested accessibility considerations section.

torgo commented 2 months ago

As we haven't heard back from the requestor for some time on this I suggest we may want to close as "timed out" this week?

torgo commented 2 weeks ago

Just noting that the spec hasn't been updated since July of last year and we have not heard back on any of our questions. Also there has been no action on either the WebKit or Mozilla standards position threads. Hence we are going to go ahead and close this as timed out for now. Please ping us if there is any update.