소스 검색

fix(JitsiConference|stats): use 'sendToAll'

Use 'sendToAll' for 'session.restart' and 'session.terminate' events.
master
paweldomas 9 년 전
부모
커밋
5a8ed28287
1개의 변경된 파일3개의 추가작업 그리고 7개의 파일을 삭제
  1. 3
    7
      JitsiConference.js

+ 3
- 7
JitsiConference.js 파일 보기

@@ -793,8 +793,7 @@ function (jingleSession, jingleOffer, now) {
793 793
     this.room.connectionTimes["session.initiate"] = now;
794 794
     // Log "session.restart"
795 795
     if (this.wasStopped) {
796
-        Statistics.analytics.sendEvent("session.restart", now);
797
-        this.sendApplicationLog(JSON.stringify({ "id" : "session_restart"}));
796
+        Statistics.sendEventToAll("session.restart");
798 797
     }
799 798
     // add info whether call is cross-region
800 799
     var crossRegion = null;
@@ -876,11 +875,8 @@ JitsiConference.prototype.onCallEnded
876 875
 = function (JingleSession, reasonCondition, reasonText) {
877 876
     logger.info("Call ended: " + reasonCondition + " - " + reasonText);
878 877
     this.wasStopped = true;
879
-    // Send analytics event
880
-    Statistics.analytics.sendEvent(
881
-        "session.terminate", window.performance.now());
882
-    // Sends "session.terminate" through the stats as well
883
-    this.sendApplicationLog(JSON.stringify({ "id" : "session_terminate" }));
878
+    // Send session.terminate event
879
+    Statistics.sendEventToAll("session.terminate");
884 880
     // Stop the stats
885 881
     if (this.statistics) {
886 882
         this.statistics.stopRemoteStats();

Loading…
취소
저장