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 f4da678465
commit cf8950110f
7 changed files with 18 additions and 3 deletions

3
app.js
View File

@ -60,6 +60,8 @@ function obtainConfigAndInit() {
// Get config result callback
function(success, error) {
if (success) {
console.log("(TIME) configuration fetched:\t",
window.performance.now());
init();
} else {
// Show obtain config error,
@ -75,6 +77,7 @@ function obtainConfigAndInit() {
$(document).ready(function () {
console.log("(TIME) document ready:\t", window.performance.now());
var URLProcessor = require("./modules/config/URLProcessor");
URLProcessor.setConfigParametersFromUrl();

View File

@ -9,6 +9,7 @@
<meta itemprop="name" content="Jitsi Meet"/>
<meta itemprop="description" content="Join a WebRTC video conference powered by the Jitsi Videobridge"/>
<meta itemprop="image" content="/images/jitsilogo.png"/>
<script>console.log("(TIME) index.html loaded:\t", window.performance.now());</script>
<script src="https://api.callstats.io/static/callstats.min.js"></script>
<script src="config.js?v=14"></script><!-- adapt to your needs, i.e. set hosts and bosh path -->
<script src="interface_config.js?v=6"></script>

View File

@ -117,6 +117,11 @@ SmallVideo.createStreamElement = function (stream) {
element.id = (isVideo ? 'remoteVideo_' : 'remoteAudio_') +
APP.RTC.getStreamID(stream);
element.onplay = function() {
console.log("(TIME) Render " + (isVideo ? 'video' : 'audio') + ":\t",
window.performance.now());
};
element.oncontextmenu = function () { return false; };
return element;

View File

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

View File

@ -234,6 +234,8 @@ module.exports = function(XMPP, eventEmitter) {
}
if (!this.joined) {
this.joined = true;
console.log("(TIME) MUC joined:\t",
window.performance.now());
eventEmitter.emit(XMPPEvents.MUC_JOINED, from, member);
this.list_members.push(from);
}

View File

@ -95,6 +95,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

@ -80,8 +80,9 @@ function connect(jid, password) {
var connectionFailed = false;
var lastErrorMsg;
connection.connect(jid, password, function (status, msg) {
console.log('Strophe status changed to',
Strophe.getStatusString(status), msg);
console.log("(TIME) Strophe " + Strophe.getStatusString(status) +
(msg ? "[" + msg + "]" : "") +
"\t:" + window.performance.now());
if (status === Strophe.Status.CONNECTED) {
if (config.useStunTurn) {
connection.jingle.getStunAndTurnCredentials();