瀏覽代碼

Adds additional logs, including timestamps relative to the initial

request.
j8
Boris Grozev 10 年之前
父節點
當前提交
cf8950110f

+ 3
- 0
app.js 查看文件

@@ -60,6 +60,8 @@ function obtainConfigAndInit() {
60 60
             // Get config result callback
61 61
             function(success, error) {
62 62
                 if (success) {
63
+                    console.log("(TIME) configuration fetched:\t",
64
+                                window.performance.now());
63 65
                     init();
64 66
                 } else {
65 67
                     // Show obtain config error,
@@ -75,6 +77,7 @@ function obtainConfigAndInit() {
75 77
 
76 78
 
77 79
 $(document).ready(function () {
80
+    console.log("(TIME) document ready:\t", window.performance.now());
78 81
 
79 82
     var URLProcessor = require("./modules/config/URLProcessor");
80 83
     URLProcessor.setConfigParametersFromUrl();

+ 1
- 0
index.html 查看文件

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

+ 5
- 0
modules/UI/videolayout/SmallVideo.js 查看文件

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

+ 2
- 1
modules/xmpp/JingleSessionPC.js 查看文件

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

+ 2
- 0
modules/xmpp/strophe.emuc.js 查看文件

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

+ 2
- 0
modules/xmpp/strophe.jingle.js 查看文件

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

+ 3
- 2
modules/xmpp/xmpp.js 查看文件

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

Loading…
取消
儲存