w3c / mediacapture-surface-control

Web API allowing capturing applications limited control over captured surfaces.
https://w3c.github.io/mediacapture-surface-control/
Other
9 stars 1 forks source link

Should a web page allow to select specific types of event to be forwarded and not others #47

Open youennf opened 2 weeks ago

youennf commented 2 weeks ago

Capture control may allow to forward user gestures. And we might extend the list of user gestures that can be forwarded.

In that case, what happens to web pages when we allow new user gestures?

youennf commented 2 weeks ago

The first thing is I would like to avoid a new API for each new user gesture.

By allowing a page to express its interest to forward user gestures as a whole, this makes it forward compatible if UA implements forwarding of a new user gesture.

Maybe that is the only thing we need. Or maybe web application might want to disallow some specific user gestures that would not be useful.

eladalon1983 commented 2 weeks ago

I believe it best to be explicit.

This is a trivial addition:

controller.forwardWheel();
controller.forwardPinch();

This too is trivial:

controller.forwardGestures({wheel: true, pinch: true});

As would:

controller.forwardGestures({all: true});

Allowing the application the flexibility of opting in/out of specific gestures might be very significant for those apps that need this, while costing those apps that don't need it nothing (especially with the all version I propose here).

eladalon1983 commented 1 day ago

Issue transferred; heads up to those discussion participants who might otherwise be looking for it elsewhere: @jan-ivar, @youennf