Ver código fonte

Adds analytics event and console log for TTFM (time to first media).

master
damencho 9 anos atrás
pai
commit
06c636311d
2 arquivos alterados com 12 adições e 0 exclusões
  1. 6
    0
      conference.js
  2. 6
    0
      modules/UI/videolayout/SmallVideo.js

+ 6
- 0
conference.js Ver arquivo

@@ -628,6 +628,12 @@ export default {
628 628
     sendFeedback (overallFeedback, detailedFeedback) {
629 629
         return room.sendFeedback (overallFeedback, detailedFeedback);
630 630
     },
631
+    /**
632
+     * Returns the connection times stored in the library.
633
+     */
634
+    getConnectionTimes () {
635
+        return this._room.getConnectionTimes();
636
+    },
631 637
     // used by torture currently
632 638
     isJoined () {
633 639
         return this._room

+ 6
- 0
modules/UI/videolayout/SmallVideo.js Ver arquivo

@@ -167,6 +167,12 @@ SmallVideo.createStreamElement = function (stream) {
167 167
         console.log("(TIME) Render " + type + ":\t",
168 168
                     now);
169 169
         AnalyticsAdapter.sendEvent('render.' + type, now);
170
+
171
+        var ttfm = now - APP.connectionTimes["document.ready"]
172
+            - (APP.conference.getConnectionTimes()["session.initiate"]
173
+                - APP.conference.getConnectionTimes()["muc.joined"]);
174
+        console.log("(TIME) TTFM " + type + ":\t", ttfm);
175
+        AnalyticsAdapter.sendEvent('ttfm.' + type, ttfm);
170 176
     };
171 177
     return element;
172 178
 };

Carregando…
Cancelar
Salvar