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

> Here are a bunch of questions that might be helpful for the above question and how it could interact with `configurationchange`.
> 
> 1. Should setting synchronously `track.enabled` to false as part of either event handler/callback prevent new surface frames to be provided to all track's sinks (if using a promise to pause, let's say the web app returns `Promise.resolve()`?

Yes.

> 2. If we add a new callback/event, what would be the timing of `configurationchange` event listeners? Would it be before, after? If after, would there be a guarantee that frames would not be delivered to sinks at the time the callback is called.

From an application point of view, I think the following order would be preferable for tracks on the main thread:
1. Tracks are updated.
2. The callback/event on the `CaptureController` is called/emitted.
3. `configurationchange` is emitted.

For tracks in worker threads, we might want to relax the ordering somewhat to avoid excessive synchronization.

> 3. In workers, what is the timing of `configurationchange` event vs. exposure of video frames with MSTP?

If we want to support the distributed use case, we need to extend the auto-pause guarantee so that the `configurationchange` event for a track is received before any frames from the new surface are exposed on that track.

> 4. Is it useful to expose deviceIds ([Should screen capture tracks expose deviceId? mediacapture-screen-share#308](https://github.com/w3c/mediacapture-screen-share/issues/308)) for this use case?

Maybe. Exposing deviceIds is one way of informing applications that a `configurationchange` is caused by surface-switching, but I’m sure there are other alternatives we could employ. I believe we are open to exposing deviceIds, with the caveats noted in [mediacapture-screen-share#308](https://github.com/w3c/mediacapture-screen-share/issues/308).


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


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

Received on Tuesday, 12 November 2024 14:06:50 UTC