-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IceGatherer States #164
Comments
Here is a more detailed proposal: partial interface RTCIceGatherer { ongathererstatechange of type EventHandler, , nullable 5.4 enum RTCIceGathererState RTCIceGathererState represents the current state of the ICE gatherer. enum RTCIceGathererState { Enumeration description gathering idle sleeping 5.5 RTCIceGathererStateChangedEvent The icegathererstatechange event of the RTCIceGatherer object uses the RTCIceGathererStateChangedEvent interface. Firing an RTCIceGathererStateChangedEvent event named e with an RTCIceGathererState state means that an event with the name e, which does not bubble (except where otherwise stated) and is not cancelable (except where otherwise stated), and which uses the RTCIceGathererStateChangedEvent interface with the state attribute set to the new RTCIceGathererState, must be created and dispatched at the given target. dictionary RTCIceGathererStateChangedEventInit : EventInit { [Constructor(DOMString type, RTCIceGathererStateChangedEventInit eventInitDict)] 5.5.1 Attributes state of type RTCIceGathererState, readonly 5.5.2 Dictionary RTCIceGathererStateChangedEventInit Members state of type RTCIceGathererState, nullable |
Note that WebRTC 1.0 has RTCIceGatheringState: enum RTCIceGatheringState { new The object was just created, and no networking has occurred yet. For backward compatibility, I would propose the following for RTCIceGathererState: enum RTCIceGathererState { new gathering complete sleeping |
Iñaki has questioned the relevance of the "sleeping" state: This raised questions about the relationship between the IceTransport and IceGatherer objects. Several clarifications may be useful to add to section 5.1: 5.1 Overview An RTCIceGatherer instance is associated to an RTCIceTransport. However, the RTCIceGatherer object responds to connectivity checks even before an RTCIceTransport is constructed or RTCIceTransport.start() is called. Note that the pruning of candidate pairs within an RTCIceTransport does not affect the availability of candidates within an RTCIceGatherer object. |
Here is the proposed text for Section 5.4: 5.4 enum RTCIceGathererState RTCIceGathererState represents the current state of the ICE gatherer. enum RTCIceGathererState { Enumeration description new gathering complete |
Just to make it more clear:
The RTCIceGatherer has completed gathering. Events such as adding, updating, or removing an interface or a new, changing, or removing TURN server will cause the state to go back to |
#48 Update to the Statistics API, reflecting: #85 Update on 'automatic' use of scalable video coding, as noted in: #156 Update to the H.264 parameters, as noted in: #158 Update to the 'Big Picture', as noted in: #159 Added support for maxptime, as noted in: #160 Changed 'RTCIceTransportEvent' to 'RTCIceGathererEvent' as noted in: #161 Update to RTCRtpUnhandledEvent as noted in: #163 Added support for RTCIceGatherer.state as noted in: #164 Revised the text relating to RTCIceTransport.start() as noted in: #166 Added text relating to DTLS interoperability with WebRTC 1.0, as noted in: #167 Revised the text relating to RTCDtlsTransport.start() as noted in: #168 Clarified handling of incoming connectivity checks by the RTCIceGatherer as noted in: #170 Added a reference to the ICE consent specification, as noted in: #171
Also add an entry to the RTCIceGatherer event table in Section 15: Event name Interface Fired when... |
While we have RTCIceTransportState to indicate the state of the RTCIceTransport, there is no equivalent state variable for the RTCIceGatherer.
When the RTCIceGatherer object is constructed, it begins to actively gather candidates. When "end of candidates" is delivered, candidate gathering has been completed.
However, recently continuous gathering has been proposed:
http://juberti.github.io/draughts/nombis/draft-uberti-mmusic-nombis.html
Where continuous gathering is allowed, there can be an intermediate state where the RTCIceGatherer is idle. The addition of an IceGathererStates attribute could allow this to be indicated:
enum IceGathererStates {
"gathering", // actively gathering candidates
"idle", // candidates gathered but awake for connectivity checks
"sleeping" // non warm / used candidates have been pruned
};
In addition, an event would be needed for changes to the IceGatherer state:
partial interface RTCIceGatherer {
attribute EventHandler? onstatechanged;
};
The text was updated successfully, but these errors were encountered: