Bladeren bron

refactor(audio_problem): Remove audio problem detection

dev1
hristoterezov 9 jaren geleden
bovenliggende
commit
14ad15d956

+ 0
- 99
JitsiConference.js Bestand weergeven

@@ -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

+ 0
- 4
JitsiConferenceEventManager.js Bestand weergeven

@@ -572,10 +572,6 @@ JitsiConferenceEventManager.prototype.setupStatisticsListeners = function () {
572 572
             JitsiConferenceEvents.CONNECTION_STATS, stats);
573 573
     });
574 574
 
575
-    conference.statistics.addAudioProblemListener(function (ssrc) {
576
-        conference._reportAudioProblem(ssrc);
577
-    });
578
-
579 575
     conference.statistics.addByteSentStatsListener(function (stats) {
580 576
         conference.getLocalTracks().forEach(function (track) {
581 577
             var ssrc = track.getSSRC();

+ 1
- 4
JitsiTrackEvents.js Bestand weergeven

@@ -6,10 +6,7 @@ export const LOCAL_TRACK_STOPPED = "track.stopped";
6 6
  * Audio levels of a this track was changed.
7 7
  */
8 8
 export const TRACK_AUDIO_LEVEL_CHANGED = "track.audioLevelsChanged";
9
-/**
10
- * Detects that no audio have been sent.
11
- */
12
-export const TRACK_AUDIO_NOT_WORKING = "track.audioNotWorking";
9
+
13 10
 /**
14 11
  * The audio output of the track was changed.
15 12
  */

+ 0
- 12
modules/statistics/CallStats.js Bestand weergeven

@@ -378,18 +378,6 @@ CallStats.prototype.sendTerminateEvent = _try_catch(function () {
378 378
         callStats.fabricEvent.fabricTerminated, this.confID);
379 379
 });
380 380
 
381
-/**
382
- * Notifies CallStats that audio problems are detected.
383
- *
384
- * @param {Error} e error to send
385
- * @param {CallStats} cs callstats instance related to the error (optional)
386
- */
387
-CallStats.prototype.sendDetectedAudioProblem = _try_catch(function (e) {
388
-    CallStats._reportError.call(this, wrtcFuncNames.applicationLog, e,
389
-        this.peerconnection);
390
-});
391
-
392
-
393 381
 /**
394 382
  * Notifies CallStats for ice connection failed
395 383
  * @param {RTCPeerConnection} pc connection on which failure occured.

+ 0
- 5
modules/statistics/RTPStatsCollector.js Bestand weergeven

@@ -648,11 +648,6 @@ StatsCollector.prototype.processStatsReport = function () {
648 648
             bytesSent = Math.round(((bytesSent * 8) / time) / 1000);
649 649
         }
650 650
 
651
-        //detect audio issues (receiving data but audioLevel == 0)
652
-        if(bytesReceived > 10 && ssrcStats.ssrc2AudioLevel === 0) {
653
-            this.eventEmitter.emit(StatisticsEvents.AUDIO_NOT_WORKING, ssrc);
654
-        }
655
-
656 651
         ssrcStats.setSsrcBitrate({
657 652
             "download": bytesReceived,
658 653
             "upload": bytesSent

+ 0
- 18
modules/statistics/statistics.js Bestand weergeven

@@ -190,14 +190,6 @@ Statistics.prototype.removeAudioLevelListener = function(listener) {
190 190
     this.eventEmitter.removeListener(StatisticsEvents.AUDIO_LEVEL, listener);
191 191
 };
192 192
 
193
-/**
194
- * Adds listener for detected audio problems.
195
- * @param listener the listener.
196
- */
197
-Statistics.prototype.addAudioProblemListener = function (listener) {
198
-    this.eventEmitter.on(StatisticsEvents.AUDIO_NOT_WORKING, listener);
199
-};
200
-
201 193
 Statistics.prototype.addConnectionStatsListener = function (listener) {
202 194
     this.eventEmitter.on(StatisticsEvents.CONNECTION_STATS, listener);
203 195
 };
@@ -444,16 +436,6 @@ Statistics.prototype.sendAddIceCandidateFailed = function (e, pc) {
444 436
         CallStats.sendAddIceCandidateFailed(e, pc, this.callstats);
445 437
 };
446 438
 
447
-/**
448
- * Notifies CallStats that audio problems are detected.
449
- *
450
- * @param {Error} e error to send
451
- */
452
-Statistics.prototype.sendDetectedAudioProblem = function (e) {
453
-    if(this.callstats)
454
-        this.callstats.sendDetectedAudioProblem(e);
455
-};
456
-
457 439
 /**
458 440
  * Adds to CallStats an application log.
459 441
  *

+ 0
- 8
service/statistics/Events.js Bestand weergeven

@@ -10,14 +10,6 @@
10 10
  */
11 11
 export const AUDIO_LEVEL = "statistics.audioLevel";
12 12
 
13
-/**
14
- * Notifies about audio problem with remote participant.
15
- *
16
- * @param ssrc - The synchronization source identifier (SSRC) of the remote
17
- * participant whose audio exhibits problems.
18
- */
19
-export const AUDIO_NOT_WORKING = "statistics.audio_not_working";
20
-
21 13
 /**
22 14
  * An event carrying all statistics by ssrc.
23 15
  */

Laden…
Annuleren
Opslaan