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

While writing the above code example, I found no way to await injection, which felt frustrating. Contrast with:
```js
video.srcObject = (await new Promise(r => controller.onsourceswitch = r)).stream.clone();
// the tracks in video.srcObject are now surface tracks
await new Promise(r => controller.onsourceswitch = r);
// the tracks in video.srcObject have been injected
```

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


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

Received on Wednesday, 2 October 2024 23:10:01 UTC