Re: [mediacapture-main] addtrack and removetrack events only fire when user agent updates stream (#517)

I'm closing this question as answered. For better or worse, this is the API we've designed, and there's not web compatible way to change it at this point.

As Adam explains, to fire an event from a synchronous change method, would require us either to fire the event synchronously before the method returns, re-entering JavaScript, which is not POLA, or fire the event later, after the change has happened, a semantic break with guarantees today's event handlers enjoy (the added track may have since been removed and vice versa).

Adding a new event fails the "minimal API" test, and is easily done in a polyfill, which seems appropriate since it seems that mostly libraries would need this anyway.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/517#issuecomment-553912117 using your GitHub account

Received on Thursday, 14 November 2019 14:29:20 UTC