浏览代码

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

master
damencho 9 年前
父节点
当前提交
06c636311d
共有 2 个文件被更改,包括 12 次插入0 次删除
  1. 6
    0
      conference.js
  2. 6
    0
      modules/UI/videolayout/SmallVideo.js

+ 6
- 0
conference.js 查看文件

628
     sendFeedback (overallFeedback, detailedFeedback) {
628
     sendFeedback (overallFeedback, detailedFeedback) {
629
         return room.sendFeedback (overallFeedback, detailedFeedback);
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
     // used by torture currently
637
     // used by torture currently
632
     isJoined () {
638
     isJoined () {
633
         return this._room
639
         return this._room

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

167
         console.log("(TIME) Render " + type + ":\t",
167
         console.log("(TIME) Render " + type + ":\t",
168
                     now);
168
                     now);
169
         AnalyticsAdapter.sendEvent('render.' + type, now);
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
     return element;
177
     return element;
172
 };
178
 };

正在加载...
取消
保存