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

My thinking is a `sourceswitch` event that fires whenever the user switches source (with no requirement to stop tracks) might be useful even to capture-agnostic applications. E.g. to disambiguate [configurationchange](https://w3c.github.io/mediacapture-extensions/#dfn-configurationchange) events fired on its tracks.

> > Something like `captureController.processSourceSwitch(stream => { ... });` or `captureController.processSourceSwitch(null);`
> 
> I’m fine with this.

Note the session vs surface tracks distinction won't hold here. E.g.
```js
video.srcObject = (await new Promise(r => controller.processSourceSwitch(r)).stream;
controller.processSourceSwitch(null);
// the tracks in video.srcObject are now surface tracks yet subject to injection
```

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


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

Received on Wednesday, 2 October 2024 22:53:47 UTC