瀏覽代碼

Adds additional that are going to be visible in torture for the audio problem detection

dev1
hristoterezov 9 年之前
父節點
當前提交
c5e83fbefe
共有 1 個文件被更改,包括 40 次插入2 次删除
  1. 40
    2
      JitsiConference.js

+ 40
- 2
JitsiConference.js 查看文件

@@ -951,6 +951,8 @@ JitsiConference.prototype.isCallstatsEnabled = function () {
951 951
  * Reports detected audio problem with the media stream related to the passed
952 952
  * ssrc.
953 953
  * @param ssrc {string} the ssrc
954
+ * NOTE: all logger.log calls are there only to be able to see the info in
955
+ * torture
954 956
  */
955 957
 JitsiConference.prototype._reportAudioProblem = function (ssrc) {
956 958
     if(this.reportedAudioSSRCs[ssrc])
@@ -959,32 +961,58 @@ JitsiConference.prototype._reportAudioProblem = function (ssrc) {
959 961
     if(!track || !track.isAudioTrack())
960 962
         return;
961 963
 
964
+    var id = track.getParticipantId();
965
+    var displayName = null;
966
+    if(id) {
967
+        var participant = this.getParticipantById(id);
968
+        if(participant) {
969
+            displayName = participant.getDisplayName();
970
+        }
971
+    }
962 972
     this.reportedAudioSSRCs[ssrc] = true;
963 973
     var errorContent = {
964 974
         errMsg: "The audio is received but not played",
965
-        ssrc: ssrc
975
+        ssrc: ssrc,
976
+        jid: id,
977
+        displayName: displayName
966 978
     };
967 979
 
980
+    logger.log("=================The audio is received but not played" +
981
+        "======================");
982
+    logger.log("ssrc: ", ssrc);
983
+    logger.log("jid: ", id);
984
+    logger.log("displayName: ", displayName);
985
+
968 986
     var mstream = track.stream, mtrack = track.track;
969 987
     if(mstream) {
988
+        logger.log("MediaStream:");
970 989
         errorContent.MediaStream = {
971 990
             active: mstream.active,
972 991
             id: mstream.id
973
-        }
992
+        };
993
+        logger.log("active: ", mstream.active);
994
+        logger.log("id: ", mstream.id);
974 995
     }
975 996
 
976 997
     if(mtrack) {
998
+        logger.log("MediaStreamTrack:");
977 999
         errorContent.MediaStreamTrack = {
978 1000
             enabled: mtrack.enabled,
979 1001
             id: mtrack.id,
980 1002
             label: mtrack.label,
981 1003
             muted: mtrack.muted
982 1004
         }
1005
+        logger.log("enabled: ", mtrack.enabled);
1006
+        logger.log("id: ", mtrack.id);
1007
+        logger.log("label: ", mtrack.label);
1008
+        logger.log("muted: ", mtrack.muted);
983 1009
     }
984 1010
 
985 1011
     if(track.containers) {
986 1012
         errorContent.containers = [];
1013
+        logger.log("Containers:");
987 1014
         track.containers.forEach(function (container) {
1015
+            logger.log("Container:");
988 1016
             errorContent.containers.push({
989 1017
                 autoplay: container.autoplay,
990 1018
                 muted: container.muted,
@@ -995,11 +1023,21 @@ JitsiConference.prototype._reportAudioProblem = function (ssrc) {
995 1023
                 paused: container.paused,
996 1024
                 readyState: container.readyState
997 1025
             });
1026
+            logger.log("autoplay: ", container.autoplay);
1027
+            logger.log("muted: ", container.muted);
1028
+            logger.log("src: ", container.src);
1029
+            logger.log("volume: ", container.volume);
1030
+            logger.log("id: ", container.id);
1031
+            logger.log("ended: ", container.ended);
1032
+            logger.log("paused: ", container.paused);
1033
+            logger.log("readyState: ", container.readyState);
998 1034
         });
999 1035
     }
1000 1036
 
1001 1037
     this.statistics.sendDetectedAudioProblem(
1002 1038
         new Error(JSON.stringify(errorContent)));
1039
+    // Prints JSON.stringify(errorContent) to be able to see all properties of
1040
+    // errorContent from torture
1003 1041
     logger.error("Audio problem detected. The audio is received but not played",
1004 1042
         errorContent);
1005 1043
 };

Loading…
取消
儲存