- From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
- Date: Thu, 30 Jan 2025 21:20:56 +0000
- To: public-webrtc@w3.org
jan-ivar has just created a new issue for https://github.com/w3c/mediacapture-surface-control: == Improve forwarding behavior in the overlay case == `forwardWheel(element)` accepts an arbitrary element, forwarding coordinates scaled relative to that element's position and size: _"Let [scaledX, scaledY] be the result of the [scale element coordinates algorithm](https://w3c.github.io/mediacapture-surface-control/#dfn-scale-element-coordinates-algorithm) on [event.[offsetX](https://www.w3.org/TR/cssom-view-1/#dom-mouseevent-offsetx), event.[offsetY](https://www.w3.org/TR/cssom-view-1/#dom-mouseevent-offsety)] and [this](https://webidl.spec.whatwg.org/#this).[[[ForwardWheelElement]]](https://w3c.github.io/mediacapture-surface-control/#dfn-forwardwheelelement)."_ For this to behave sanely, the web developer must pass in either the video element playing the preview, or an overlay element carefully positioned and scaled to have the exact same offset and dimensions, and maintain this over time. There's no guarantee the given element lines up with a video preview at all, which can lead to surprising and hard to understand behavior (layout bugs might go unnoticed until a user tries to scroll a page with iframes). Relying on the web developer like this seems error-prone. These seems like assumptions we can avoid by passing in both the video element and the overlay. This would let us define more predictable behaviors (2 instead of 1) <img width="908" alt="Image" src="https://github.com/user-attachments/assets/fcdc73fc-a1d1-4bf9-9ba8-7c7e5f80c29b" /> The overlay is shown at an offset to illustrate behavior resilience. Behavior degrades in a more predictable way in 2. Please view or discuss this issue at https://github.com/w3c/mediacapture-surface-control/issues/69 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 30 January 2025 21:20:57 UTC