Re: [mediacapture-screen-share] Auto-pause capture when user switches captured content (#255)

> There's no proposal to use Observers so §7.8 seems irrelevant.

The relevance is that although §7.3 warns against reinventing events, §7.8 acknowledges that events aren't always the best option, and opens the door to judicious use of other patterns. I believe callbacks are an established such pattern with some precedents.

> > ... multiple event handlers would be problematic if the first stops the track and the second handler receives a stopped track.
>
> Nothing wrong with that.

It seems like a footgun to me. Perhaps an even clearer footgun is constraints, where one listener could affect what another listener receives - unless we specify that these are separate tracks? What precisely would the relation be between the different tracks fired for different events-listeners? Clones? References to the same tracks? Independent tracks with the same source?

On another topic - I have asked a question multiple-times and only got a [non-answer](https://github.com/w3c/mediacapture-screen-share/issues/255#issuecomment-1812546088). I think it is an important question. Namely - what application needs to decide dynamically whether it wants to source-inject or not? I think this is the primary question, and the question of events vs. callbacks is secondary.

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


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

Received on Monday, 20 November 2023 10:17:49 UTC