Add ICEConnectionState to RTCPeerConnection

This commit is contained in:
Manish Goregaokar 2019-03-06 12:31:17 +05:30
parent 209caa418b
commit fc25a80892
3 changed files with 76 additions and 7 deletions

View file

@ -20,7 +20,7 @@ interface RTCPeerConnection : EventTarget {
Promise<void> addIceCandidate(optional RTCIceCandidateInit candidate);
// readonly attribute RTCSignalingState signalingState;
readonly attribute RTCIceGatheringState iceGatheringState;
// readonly attribute RTCIceConnectionState iceConnectionState;
readonly attribute RTCIceConnectionState iceConnectionState;
// readonly attribute RTCPeerConnectionState connectionState;
// readonly attribute boolean? canTrickleIceCandidates;
// static sequence<RTCIceServer> getDefaultIceServers();
@ -31,7 +31,7 @@ interface RTCPeerConnection : EventTarget {
attribute EventHandler onicecandidate;
// attribute EventHandler onicecandidateerror;
// attribute EventHandler onsignalingstatechange;
// attribute EventHandler oniceconnectionstatechange;
attribute EventHandler oniceconnectionstatechange;
attribute EventHandler onicegatheringstatechange;
// attribute EventHandler onconnectionstatechange;
@ -95,3 +95,13 @@ enum RTCIceGatheringState {
"gathering",
"complete"
};
enum RTCIceConnectionState {
"new",
"checking",
"connected",
"completed",
"disconnected",
"failed",
"closed"
};