From 208f9b845f31e8d815a34acd1fdefc84721531ee Mon Sep 17 00:00:00 2001 From: Eugene Voityuk Date: Fri, 29 Sep 2017 17:57:54 +0300 Subject: [PATCH 1/2] Update index.js Added iceGatheringState change handler --- index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.js b/index.js index ff96b12..47e8156 100644 --- a/index.js +++ b/index.js @@ -77,6 +77,13 @@ function TraceablePeerConnection(config, constraints) { self.oniceconnectionstatechange(event); } }; + this.onicegatheringstatechange = null; + this.peerconnection.onicegatheringstatechange = function (event) { + self.trace('onicegatheringstatechange', self.iceGatheringState); + if (self.onicegatheringstatechange !== null) { + self.onicegatheringstatechange(event); + } + }; this.onnegotiationneeded = null; this.peerconnection.onnegotiationneeded = function (event) { self.trace('onnegotiationneeded'); From 8432e4626c3d093d1213162f4869d48958ba3dce Mon Sep 17 00:00:00 2001 From: Eugene Voityuk Date: Fri, 29 Sep 2017 18:29:58 +0300 Subject: [PATCH 2/2] Update index.js fix self property definition --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 47e8156..4d8bb08 100644 --- a/index.js +++ b/index.js @@ -104,7 +104,7 @@ function TraceablePeerConnection(config, constraints) { util.inherits(TraceablePeerConnection, WildEmitter); -['signalingState', 'iceConnectionState', 'localDescription', 'remoteDescription'].forEach(function (prop) { +['signalingState', 'iceGatheringState', 'iceConnectionState', 'localDescription', 'remoteDescription'].forEach(function (prop) { Object.defineProperty(TraceablePeerConnection.prototype, prop, { get: function () { return this.peerconnection[prop];