|
|
@@ -68,6 +68,7 @@ function JitsiConference(options) {
|
|
68
|
68
|
video: undefined
|
|
69
|
69
|
};
|
|
70
|
70
|
this.isMutedByFocus = false;
|
|
|
71
|
+ this.reportedAudioSSRCs = {};
|
|
71
|
72
|
}
|
|
72
|
73
|
|
|
73
|
74
|
/**
|
|
|
@@ -944,6 +945,63 @@ JitsiConference.prototype.isCallstatsEnabled = function () {
|
|
944
|
945
|
return this.statistics.isCallstatsEnabled();
|
|
945
|
946
|
}
|
|
946
|
947
|
|
|
|
948
|
+/**
|
|
|
949
|
+ * Reports detected audio problem with the media stream related to the passed
|
|
|
950
|
+ * ssrc.
|
|
|
951
|
+ * @param ssrc {string} the ssrc
|
|
|
952
|
+ */
|
|
|
953
|
+JitsiConference.prototype._reportAudioProblem = function (ssrc) {
|
|
|
954
|
+ if(this.reportedAudioSSRCs[ssrc])
|
|
|
955
|
+ return;
|
|
|
956
|
+ var track = this.rtc.getRemoteTrackBySSRC(ssrc);
|
|
|
957
|
+ if(!track || !track.isAudioTrack())
|
|
|
958
|
+ return;
|
|
|
959
|
+
|
|
|
960
|
+ this.reportedAudioSSRCs[ssrc] = true;
|
|
|
961
|
+ var errorContent = {
|
|
|
962
|
+ errMsg: "The audio is received but not played",
|
|
|
963
|
+ ssrc: ssrc
|
|
|
964
|
+ };
|
|
|
965
|
+
|
|
|
966
|
+ var mstream = track.stream, mtrack = track.track;
|
|
|
967
|
+ if(mstream) {
|
|
|
968
|
+ errorContent.MediaStream = {
|
|
|
969
|
+ active: mstream.active,
|
|
|
970
|
+ id: mstream.id
|
|
|
971
|
+ }
|
|
|
972
|
+ }
|
|
|
973
|
+
|
|
|
974
|
+ if(mtrack) {
|
|
|
975
|
+ errorContent.MediaStreamTrack = {
|
|
|
976
|
+ enabled: mtrack.enabled,
|
|
|
977
|
+ id: mtrack.id,
|
|
|
978
|
+ label: mtrack.label,
|
|
|
979
|
+ muted: mtrack.muted
|
|
|
980
|
+ }
|
|
|
981
|
+ }
|
|
|
982
|
+
|
|
|
983
|
+ if(track.containers) {
|
|
|
984
|
+ errorContent.containers = [];
|
|
|
985
|
+ track.containers.forEach(function (container) {
|
|
|
986
|
+ errorContent.containers.push({
|
|
|
987
|
+ autoplay: container.autoplay,
|
|
|
988
|
+ muted: container.muted,
|
|
|
989
|
+ src: container.src,
|
|
|
990
|
+ volume: container.volume,
|
|
|
991
|
+ id: container.id,
|
|
|
992
|
+ ended: container.ended,
|
|
|
993
|
+ paused: container.paused,
|
|
|
994
|
+ readyState: container.readyState
|
|
|
995
|
+ });
|
|
|
996
|
+ });
|
|
|
997
|
+ }
|
|
|
998
|
+
|
|
|
999
|
+ this.statistics.sendDetectedAudioProblem(
|
|
|
1000
|
+ new Error(JSON.stringify(errorContent)));
|
|
|
1001
|
+ logger.error("Audio problem detected. The audio is received but not played",
|
|
|
1002
|
+ errorContent);
|
|
|
1003
|
+}
|
|
|
1004
|
+
|
|
947
|
1005
|
/**
|
|
948
|
1006
|
* Setups the listeners needed for the conference.
|
|
949
|
1007
|
* @param conference the conference
|
|
|
@@ -1309,6 +1367,11 @@ function setupListeners(conference) {
|
|
1309
|
1367
|
|
|
1310
|
1368
|
conference.rtc.setAudioLevel(resource, level);
|
|
1311
|
1369
|
});
|
|
|
1370
|
+
|
|
|
1371
|
+ conference.statistics.addAudioProblemListener(function (ssrc) {
|
|
|
1372
|
+ conference._reportAudioProblem(ssrc)
|
|
|
1373
|
+ });
|
|
|
1374
|
+
|
|
1312
|
1375
|
conference.statistics.addConnectionStatsListener(function (stats) {
|
|
1313
|
1376
|
var ssrc2resolution = stats.resolution;
|
|
1314
|
1377
|
|