Adds additional logs, including timestamps relative to the initial

request.
This commit is contained in:
Boris Grozev 2015-10-06 16:36:41 -05:00
parent 0aa16c6b4c
commit 2e32848b11
4 changed files with 7 additions and 2 deletions

View File

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

View File

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

View File

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

View File

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