- From: Elad Alon via GitHub <sysbot+gh@w3.org>
- Date: Fri, 10 Nov 2023 11:02:46 +0000
- To: public-webrtc-logs@w3.org
> My concern remains that this API becomes a way for apps to intentionally or accidentally block a useful existing feature As discussed during TPAC, this concern is already addressed. User agent can offer dynamic-switching unconditionally, with `setSourceSwitchCallback()` only controlling whether this switching takes the form of source-injection or the new mechanism. [My presentation](https://docs.google.com/presentation/d/1i0tZ1rRFh4Ibn3KxfEpHzEw6ixNKCgWjn1WgSEv01Dw/edit#slide=id.g1e7a04a10da_0_344) during last TPAC proposed this as an option. > I'd prefer an API that centers the old injection behavior as the norm. That's already the case. Any app that does not call `setSourceSwitchCallback()` would indeed get source-injection. No changes are required in that vein. You suggest defaulting to source-injection *even* when setCallback() is called. What are the benefits of this added complexity? > (Note that this is a quote:) > ```js > controller.onsourceswitch = event => { > if (video.srcObject.getTracks().length == event.stream.getTracks().length) return; > video.srcObject = event.stream; > event.preventDefault(); > }; > ``` The following is even simpler: ```js controller.setSurfaceSwitchingCallback((stream) => { video.srcObject = stream; }); ``` -- GitHub Notification of comment by eladalon1983 Please view or discuss this issue at https://github.com/w3c/mediacapture-screen-share/issues/255#issuecomment-1805518491 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 10 November 2023 11:02:48 UTC