Pārlūkot izejas kodu

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

dev1
hristoterezov 9 gadus atpakaļ
vecāks
revīzija
c5e83fbefe
1 mainītis faili ar 40 papildinājumiem un 2 dzēšanām
  1. 40
    2
      JitsiConference.js

+ 40
- 2
JitsiConference.js Parādīt failu

951
  * Reports detected audio problem with the media stream related to the passed
951
  * Reports detected audio problem with the media stream related to the passed
952
  * ssrc.
952
  * ssrc.
953
  * @param ssrc {string} the ssrc
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
 JitsiConference.prototype._reportAudioProblem = function (ssrc) {
957
 JitsiConference.prototype._reportAudioProblem = function (ssrc) {
956
     if(this.reportedAudioSSRCs[ssrc])
958
     if(this.reportedAudioSSRCs[ssrc])
959
     if(!track || !track.isAudioTrack())
961
     if(!track || !track.isAudioTrack())
960
         return;
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
     this.reportedAudioSSRCs[ssrc] = true;
972
     this.reportedAudioSSRCs[ssrc] = true;
963
     var errorContent = {
973
     var errorContent = {
964
         errMsg: "The audio is received but not played",
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
     var mstream = track.stream, mtrack = track.track;
986
     var mstream = track.stream, mtrack = track.track;
969
     if(mstream) {
987
     if(mstream) {
988
+        logger.log("MediaStream:");
970
         errorContent.MediaStream = {
989
         errorContent.MediaStream = {
971
             active: mstream.active,
990
             active: mstream.active,
972
             id: mstream.id
991
             id: mstream.id
973
-        }
992
+        };
993
+        logger.log("active: ", mstream.active);
994
+        logger.log("id: ", mstream.id);
974
     }
995
     }
975
 
996
 
976
     if(mtrack) {
997
     if(mtrack) {
998
+        logger.log("MediaStreamTrack:");
977
         errorContent.MediaStreamTrack = {
999
         errorContent.MediaStreamTrack = {
978
             enabled: mtrack.enabled,
1000
             enabled: mtrack.enabled,
979
             id: mtrack.id,
1001
             id: mtrack.id,
980
             label: mtrack.label,
1002
             label: mtrack.label,
981
             muted: mtrack.muted
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
     if(track.containers) {
1011
     if(track.containers) {
986
         errorContent.containers = [];
1012
         errorContent.containers = [];
1013
+        logger.log("Containers:");
987
         track.containers.forEach(function (container) {
1014
         track.containers.forEach(function (container) {
1015
+            logger.log("Container:");
988
             errorContent.containers.push({
1016
             errorContent.containers.push({
989
                 autoplay: container.autoplay,
1017
                 autoplay: container.autoplay,
990
                 muted: container.muted,
1018
                 muted: container.muted,
995
                 paused: container.paused,
1023
                 paused: container.paused,
996
                 readyState: container.readyState
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
     this.statistics.sendDetectedAudioProblem(
1037
     this.statistics.sendDetectedAudioProblem(
1002
         new Error(JSON.stringify(errorContent)));
1038
         new Error(JSON.stringify(errorContent)));
1039
+    // Prints JSON.stringify(errorContent) to be able to see all properties of
1040
+    // errorContent from torture
1003
     logger.error("Audio problem detected. The audio is received but not played",
1041
     logger.error("Audio problem detected. The audio is received but not played",
1004
         errorContent);
1042
         errorContent);
1005
 };
1043
 };

Notiek ielāde…
Atcelt
Saglabāt