|
|
@@ -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
|
/**
|
|
|
@@ -922,6 +923,63 @@ JitsiConference.prototype.isCallstatsEnabled = function () {
|
|
922
|
923
|
return this.statistics.isCallstatsEnabled();
|
|
923
|
924
|
}
|
|
924
|
925
|
|
|
|
926
|
+/**
|
|
|
927
|
+ * Reports detected audio problem with the media stream related to the passed
|
|
|
928
|
+ * ssrc.
|
|
|
929
|
+ * @param ssrc {string} the ssrc
|
|
|
930
|
+ */
|
|
|
931
|
+JitsiConference.prototype._reportAudioProblem = function (ssrc) {
|
|
|
932
|
+ if(this.reportedAudioSSRCs[ssrc])
|
|
|
933
|
+ return;
|
|
|
934
|
+ var track = this.rtc.getRemoteTrackBySSRC(ssrc);
|
|
|
935
|
+ if(!track || !track.isAudioTrack())
|
|
|
936
|
+ return;
|
|
|
937
|
+
|
|
|
938
|
+ this.reportedAudioSSRCs[ssrc] = true;
|
|
|
939
|
+ var errorContent = {
|
|
|
940
|
+ errMsg: "The audio is received but not played",
|
|
|
941
|
+ ssrc: ssrc
|
|
|
942
|
+ };
|
|
|
943
|
+
|
|
|
944
|
+ var mstream = track.stream, mtrack = track.track;
|
|
|
945
|
+ if(mstream) {
|
|
|
946
|
+ errorContent.MediaStream = {
|
|
|
947
|
+ active: mstream.active,
|
|
|
948
|
+ id: mstream.id
|
|
|
949
|
+ }
|
|
|
950
|
+ }
|
|
|
951
|
+
|
|
|
952
|
+ if(mtrack) {
|
|
|
953
|
+ errorContent.MediaStreamTrack = {
|
|
|
954
|
+ enabled: mtrack.enabled,
|
|
|
955
|
+ id: mtrack.id,
|
|
|
956
|
+ label: mtrack.label,
|
|
|
957
|
+ muted: mtrack.muted
|
|
|
958
|
+ }
|
|
|
959
|
+ }
|
|
|
960
|
+
|
|
|
961
|
+ if(track.containers) {
|
|
|
962
|
+ errorContent.containers = [];
|
|
|
963
|
+ track.containers.forEach(function (container) {
|
|
|
964
|
+ errorContent.containers.push({
|
|
|
965
|
+ autoplay: container.autoplay,
|
|
|
966
|
+ muted: container.muted,
|
|
|
967
|
+ src: container.src,
|
|
|
968
|
+ volume: container.volume,
|
|
|
969
|
+ id: container.id,
|
|
|
970
|
+ ended: container.ended,
|
|
|
971
|
+ paused: container.paused,
|
|
|
972
|
+ readyState: container.readyState
|
|
|
973
|
+ });
|
|
|
974
|
+ });
|
|
|
975
|
+ }
|
|
|
976
|
+
|
|
|
977
|
+ this.statistics.sendDetectedAudioProblem(
|
|
|
978
|
+ new Error(JSON.stringify(errorContent)));
|
|
|
979
|
+ logger.error("Audio problem detected. The audio is received but not played",
|
|
|
980
|
+ errorContent);
|
|
|
981
|
+}
|
|
|
982
|
+
|
|
925
|
983
|
/**
|
|
926
|
984
|
* Setups the listeners needed for the conference.
|
|
927
|
985
|
* @param conference the conference
|
|
|
@@ -1277,6 +1335,11 @@ function setupListeners(conference) {
|
|
1277
|
1335
|
|
|
1278
|
1336
|
conference.rtc.setAudioLevel(resource, level);
|
|
1279
|
1337
|
});
|
|
|
1338
|
+
|
|
|
1339
|
+ conference.statistics.addAudioProblemListener(function (ssrc) {
|
|
|
1340
|
+ conference._reportAudioProblem(ssrc)
|
|
|
1341
|
+ });
|
|
|
1342
|
+
|
|
1280
|
1343
|
conference.statistics.addConnectionStatsListener(function (stats) {
|
|
1281
|
1344
|
var ssrc2resolution = stats.resolution;
|
|
1282
|
1345
|
|