Re: [mediacapture-screen-share-extensions] [Capture control] Is gesture forwarding tied to capture controller or to MediaStreamTrack (#20)

> ```js
> div.enableGestureForwarding = true; // if on top
> ```

The reasons to use an **async** API have been previously presented [here](https://github.com/w3c/mediacapture-screen-share-extensions/issues/13#issuecomment-2438079096), and brought up in multiple other threads ([example](https://github.com/w3c/mediacapture-screen-share-extensions/issues/14#issuecomment-2457572677)).

Putting the async question aside for a moment - assume for the sake of argument that we reshape this proposal to be `div.setGestureForwarding()` and it returns a promise - I'd still oppose this proposal, because it makes unnecessary and unhelpful assumptions about the target element:
1. It assumes **a single** video element with **a single** capture. (If not, which one is being forwarded?)
2. It assumes that the element is the owner of video element. (At first glance, appears to provide security guarantees; in practice, does not.)

I also think it's poor choice of API to expose on HTMLElement or anything similarly high-level anything so capture-specific. I don't think this is good API design.

> OTOH, CaptureController.forwardWheel(x) only supports one x,

We have discussed the possibility of `CaptureController.forwardGestures(element, gesturesDict)`, which would have allowed forwarding from multiple elements. But thinking of this some more, IMHO, it is preferable to only allow forwarding from a single element, **unless** Web developers indicate a clear use that benefits users. The cost to implementers, the (slight) incrase in API complexity for developers, and the (very slight) risk of abuse, all require something to counterbalance them; but so far, such a need has not been articulated.

> It may be uncommon to have two preview elements, but **if** a website wants it, as a user I'd expect to be able to scroll both. [Emphasis mine - Elad]

[If.](https://en.wikipedia.org/wiki/Laconic_phrase)

> and x = null is how to stop fowarding (a bit surprising that).

Why is that surprising?
To name one precedent - `mst.cropTo(null)`.



-- 
GitHub Notification of comment by eladalon1983
Please view or discuss this issue at https://github.com/w3c/mediacapture-screen-share-extensions/issues/20#issuecomment-2459237788 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 6 November 2024 10:23:56 UTC