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

> The [configurationchange](https://w3c.github.io/mediacapture-extensions/#change-track-configuration) event is also subject to _"fuzzing"_

The fuzzing note is related to device label change, which applies to all capture sessions using that device.
In our case, the screenshare session (and so the surface change) is owned by a single page, there should be no fuzzing.
Maybe we should beef up a bit the note to better guide implementors.

Updating the settings before the callback makes sense to me, and the only way currently is for `configurationchange` to fire first.
If a callback is really desired, a compromise would be the following:
- enqueue a task on each track to fire `configurationchange` on each track task queue with MediaStreamTrack task source
- enqueue a task to execute the callback on capture controller task queue with MediaStreamTrack task source

I don't think the added delay of executing a few tasks will change much in practice (OS may take some time to switch capture, and web app wants user input which may take some time anyway).

> Events normally don't carry the second guarantee.

There are plenty of events that carry a window of opportunity, click events to trigger `getDisplayMedia`, `ondatachannel` for transferring a data channel, `ontrack` for applying a transform to a receiver, this is a known pattern.

As of the second guarantee, it is only useful for asynchronous pausing.
AIUI, there is no real use case for that, and I am really hesitant to expose a persistent no-video-frame state that is not muted.
If we want asynchronous source pausing, I would piggy back on the mute concept, especially since we can unmute with `MediaSession`. Something like executing the callback and then firing the mute events on tracks.

Please also note that the use cases are all about pausing the sending of video frames to specific track sinks, not to pause the source. Conceptually, a callback on CaptureController (which represents the source) is misaligned with the presented use cases.

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


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

Received on Tuesday, 19 November 2024 11:03:38 UTC