Browse Source

Adds additional logs, including timestamps relative to the initial

request.
dev1
Boris Grozev 10 years ago
parent
commit
80db340c87

+ 1
- 0
modules/xmpp/ChatRoom.js View File

@@ -260,6 +260,7 @@ ChatRoom.prototype.onPresence = function (pres) {
260 260
             }
261 261
         if (!this.joined) {
262 262
             this.joined = true;
263
+            console.log("(TIME) MUC joined:\t", window.performance.now());
263 264
             this.eventEmitter.emit(XMPPEvents.MUC_JOINED, from, member);
264 265
         }
265 266
     } else if (this.members[from] === undefined) {

+ 2
- 0
modules/xmpp/JingleSessionPC.js View File

@@ -146,6 +146,8 @@ JingleSessionPC.prototype.doInitialize = function () {
146 146
      */
147 147
     this.peerconnection.oniceconnectionstatechange = function (event) {
148 148
         if (!(self && self.peerconnection)) return;
149
+        logger.log("(TIME) ICE " + self.peerconnection.iceConnectionState +
150
+                    ":\t", window.performance.now());
149 151
         self.updateModifySourcesQueue();
150 152
         switch (self.peerconnection.iceConnectionState) {
151 153
             case 'connected':

+ 2
- 0
modules/xmpp/strophe.jingle.js View File

@@ -94,6 +94,8 @@ module.exports = function(XMPP, eventEmitter) {
94 94
             // see http://xmpp.org/extensions/xep-0166.html#concepts-session
95 95
             switch (action) {
96 96
                 case 'session-initiate':
97
+                    console.log("(TIME) received session-initiate:\t",
98
+                                window.performance.now());
97 99
                     var startMuted = $(iq).find('jingle>startmuted');
98 100
                     if (startMuted && startMuted.length > 0) {
99 101
                         var audioMuted = startMuted.attr("audio");

+ 2
- 2
modules/xmpp/xmpp.js View File

@@ -103,8 +103,8 @@ XMPP.prototype._connect = function (jid, password) {
103 103
     var connectionFailed = false;
104 104
     var lastErrorMsg;
105 105
     this.connection.connect(jid, password, function (status, msg) {
106
-        logger.log('Strophe status changed to',
107
-            Strophe.getStatusString(status), msg);
106
+        logger.log("(TIME) Strophe " + Strophe.getStatusString(status) +
107
+            (msg ? "[" + msg + "]" : "") + "\t:" + window.performance.now());
108 108
         if (status === Strophe.Status.CONNECTED) {
109 109
             if (self.options.useStunTurn) {
110 110
                 self.connection.jingle.getStunAndTurnCredentials();

Loading…
Cancel
Save