Re: [mediacapture-screen-share-extensions] Auto-pause for Captured Surface Switching (2nd edition) (#15)

A few questions:
- Why put the event in controller instead of a MediaStreamTrack? The plan seems to set enabled to false/true at track level. There is the case of two MediaStreamTrack clones one in a worker and the other in a window and it might be more handy for each track to be notified of surface switching.
- Why do we have to set `enabled` to false in step 2? Why not simply asking the web page to set `enabled` to false synchronously for each MediaStreamTrack within the event handler (or call `replaceTrack` to null) or whatever most appropriate.
- If we have `autopause`, why not using `configurationchange` which will allow having the right information via `getSettings`: the surface type, maybe deviceId...

I would tend to go with the following approach:
- Add `autopause` to `getDisplayMedia`. (Or maybe `pauseOnSurfaceSwitching`?)
- When `autopause` is true, and capture switches to a surface S, sinks of a track are guaranteed to not receive video frames from S until the `configurationchange` event is fired on that particular track.

Wdyt?


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


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

Received on Wednesday, 23 October 2024 13:43:08 UTC