W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > March 2020

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

From: Robert Klotzner via GitHub <sysbot+gh@w3.org>
Date: Wed, 11 Mar 2020 10:46:26 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-597563134-1583923585-sysbot+gh@w3.org>
> 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

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:50 UTC