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

The event API shape seems to hit a sweet spot to me.
Having an event is more extensible (say `waitUntil` in case migration should be done asynchronously).

It might be a little surprising that calling `preventDefault()` actually stops all previous tracks but I think that is fine.
It seems for instance better than the possibility we discussed of adding a boolean option to `setSurfaceSwitchingCallback` for instance.

We should dig into the actual proposal more to further evaluate Elad's concerns.
For instance, the spec should state that the old tracks migrates (and thus only start receiving new frames) after the event was fired. This begs the question of when `configurationchange` is fired for instance.
The migration logic can probably remain in the JS process, provided the switch notification happens before the sending of the new video frames.

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


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

Received on Tuesday, 14 November 2023 08:33:56 UTC