|
|
@@ -59,7 +59,6 @@ function JitsiConference(options) {
|
|
59
|
59
|
video: undefined
|
|
60
|
60
|
};
|
|
61
|
61
|
this.isMutedByFocus = false;
|
|
62
|
|
- this.reportedAudioSSRCs = {};
|
|
63
|
62
|
// Flag indicates if the 'onCallEnded' method was ever called on this
|
|
64
|
63
|
// instance. Used to log extra analytics event for debugging purpose.
|
|
65
|
64
|
// We need to know if the potential issue happened before or after
|
|
|
@@ -1199,104 +1198,6 @@ JitsiConference.prototype._onTrackAttach = function(track, container) {
|
|
1199
|
1198
|
ssrc, track.isLocal(), track.getUsageLabel(), container.id);
|
|
1200
|
1199
|
};
|
|
1201
|
1200
|
|
|
1202
|
|
-/**
|
|
1203
|
|
- * Reports detected audio problem with the media stream related to the passed
|
|
1204
|
|
- * ssrc.
|
|
1205
|
|
- * @param ssrc {string} the ssrc
|
|
1206
|
|
- * NOTE: all logger.log calls are there only to be able to see the info in
|
|
1207
|
|
- * torture
|
|
1208
|
|
- */
|
|
1209
|
|
-JitsiConference.prototype._reportAudioProblem = function (ssrc) {
|
|
1210
|
|
- if(this.reportedAudioSSRCs[ssrc])
|
|
1211
|
|
- return;
|
|
1212
|
|
- var track = this.rtc.getRemoteTrackBySSRC(ssrc);
|
|
1213
|
|
- if(!track || !track.isAudioTrack())
|
|
1214
|
|
- return;
|
|
1215
|
|
-
|
|
1216
|
|
- var id = track.getParticipantId();
|
|
1217
|
|
- var displayName = null;
|
|
1218
|
|
- if(id) {
|
|
1219
|
|
- var participant = this.getParticipantById(id);
|
|
1220
|
|
- if(participant) {
|
|
1221
|
|
- displayName = participant.getDisplayName();
|
|
1222
|
|
- }
|
|
1223
|
|
- }
|
|
1224
|
|
- this.reportedAudioSSRCs[ssrc] = true;
|
|
1225
|
|
- var errorContent = {
|
|
1226
|
|
- errMsg: "The audio is received but not played",
|
|
1227
|
|
- ssrc: ssrc,
|
|
1228
|
|
- jid: id,
|
|
1229
|
|
- displayName: displayName
|
|
1230
|
|
- };
|
|
1231
|
|
-
|
|
1232
|
|
- logger.log("=================The audio is received but not played" +
|
|
1233
|
|
- "======================");
|
|
1234
|
|
- logger.log("ssrc: ", ssrc);
|
|
1235
|
|
- logger.log("jid: ", id);
|
|
1236
|
|
- logger.log("displayName: ", displayName);
|
|
1237
|
|
-
|
|
1238
|
|
- var mstream = track.stream, mtrack = track.track;
|
|
1239
|
|
- if(mstream) {
|
|
1240
|
|
- logger.log("MediaStream:");
|
|
1241
|
|
- errorContent.MediaStream = {
|
|
1242
|
|
- active: mstream.active,
|
|
1243
|
|
- id: mstream.id
|
|
1244
|
|
- };
|
|
1245
|
|
- logger.log("active: ", mstream.active);
|
|
1246
|
|
- logger.log("id: ", mstream.id);
|
|
1247
|
|
- }
|
|
1248
|
|
-
|
|
1249
|
|
- if(mtrack) {
|
|
1250
|
|
- logger.log("MediaStreamTrack:");
|
|
1251
|
|
- errorContent.MediaStreamTrack = {
|
|
1252
|
|
- enabled: mtrack.enabled,
|
|
1253
|
|
- id: mtrack.id,
|
|
1254
|
|
- label: mtrack.label,
|
|
1255
|
|
- muted: mtrack.muted
|
|
1256
|
|
- };
|
|
1257
|
|
- logger.log("enabled: ", mtrack.enabled);
|
|
1258
|
|
- logger.log("id: ", mtrack.id);
|
|
1259
|
|
- logger.log("label: ", mtrack.label);
|
|
1260
|
|
- logger.log("muted: ", mtrack.muted);
|
|
1261
|
|
- }
|
|
1262
|
|
-
|
|
1263
|
|
- if(track.containers) {
|
|
1264
|
|
- errorContent.containers = [];
|
|
1265
|
|
- logger.log("Containers:");
|
|
1266
|
|
- track.containers.forEach(function (container) {
|
|
1267
|
|
- logger.log("Container:");
|
|
1268
|
|
- errorContent.containers.push({
|
|
1269
|
|
- autoplay: container.autoplay,
|
|
1270
|
|
- muted: container.muted,
|
|
1271
|
|
- src: container.src,
|
|
1272
|
|
- volume: container.volume,
|
|
1273
|
|
- id: container.id,
|
|
1274
|
|
- ended: container.ended,
|
|
1275
|
|
- paused: container.paused,
|
|
1276
|
|
- readyState: container.readyState
|
|
1277
|
|
- });
|
|
1278
|
|
- logger.log("autoplay: ", container.autoplay);
|
|
1279
|
|
- logger.log("muted: ", container.muted);
|
|
1280
|
|
- logger.log("src: ", container.src);
|
|
1281
|
|
- logger.log("volume: ", container.volume);
|
|
1282
|
|
- logger.log("id: ", container.id);
|
|
1283
|
|
- logger.log("ended: ", container.ended);
|
|
1284
|
|
- logger.log("paused: ", container.paused);
|
|
1285
|
|
- logger.log("readyState: ", container.readyState);
|
|
1286
|
|
- });
|
|
1287
|
|
- }
|
|
1288
|
|
-
|
|
1289
|
|
- // Prints JSON.stringify(errorContent) to be able to see all properties of
|
|
1290
|
|
- // errorContent from torture
|
|
1291
|
|
- logger.error("Audio problem detected. The audio is received but not played",
|
|
1292
|
|
- errorContent);
|
|
1293
|
|
-
|
|
1294
|
|
- delete errorContent.displayName;
|
|
1295
|
|
-
|
|
1296
|
|
- this.statistics.sendDetectedAudioProblem(
|
|
1297
|
|
- new Error(JSON.stringify(errorContent)));
|
|
1298
|
|
-};
|
|
1299
|
|
-
|
|
1300
|
1201
|
/**
|
|
1301
|
1202
|
* Logs an "application log" message.
|
|
1302
|
1203
|
* @param message {string} The message to log. Note that while this can be a
|