Re: [webrtc-pc] Is close() supposed to fire state change events? Connection state change set asynchronously? (#1883)

> The remote endpoint closing is irrelevant to this issue. The only one than can cause your local PC to close is you explicitly calling the synchronous API close().

That's at least in current Chrome not true: When I close on the remote end - the local end state changes to close - just without an event happening.

But even locally, if I have a property and a property_on_change event, I expect the event to fire when the property changes, that's the only sensible implementation imho. Any state mirroring logic falls apart otherwise - e.g. an UI displaying the current state - will never display the state "closed". 

Users are able to fix that (apart from the remote issue), by wrapping the API ... yes, but why implement an API that needs to be fixed by users? If it is important to distinguish between "user closed" and "closed for some other reason" - we should simply have the state reflect that distinction. 

-- 
GitHub Notification of comment by eskimor
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1883#issuecomment-597563134 using your GitHub account

Received on Wednesday, 11 March 2020 10:46:28 UTC