Quellcode durchsuchen

Merge pull request #278 from jitsi/remove_audio_problem_detection

Remove audio problem detection
dev1
Дамян Минков vor 9 Jahren
Ursprung
Commit
83fe728a52

+ 0
- 99
JitsiConference.js Datei anzeigen

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

+ 0
- 4
JitsiConferenceEventManager.js Datei anzeigen

@@ -567,10 +567,6 @@ JitsiConferenceEventManager.prototype.setupStatisticsListeners = function () {
567 567
             JitsiConferenceEvents.CONNECTION_STATS, stats);
568 568
     });
569 569
 
570
-    conference.statistics.addAudioProblemListener(function (ssrc) {
571
-        conference._reportAudioProblem(ssrc);
572
-    });
573
-
574 570
     conference.statistics.addByteSentStatsListener(function (stats) {
575 571
         conference.getLocalTracks().forEach(function (track) {
576 572
             var ssrc = track.getSSRC();

+ 1
- 4
JitsiTrackEvents.js Datei anzeigen

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

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

+ 0
- 5
modules/statistics/RTPStatsCollector.js Datei anzeigen

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

@@ -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
 };
@@ -445,16 +437,6 @@ Statistics.prototype.sendAddIceCandidateFailed = function (e, pc) {
445 437
         CallStats.sendAddIceCandidateFailed(e, pc, this.callstats);
446 438
 };
447 439
 
448
-/**
449
- * Notifies CallStats that audio problems are detected.
450
- *
451
- * @param {Error} e error to send
452
- */
453
-Statistics.prototype.sendDetectedAudioProblem = function (e) {
454
-    if(this.callstats)
455
-        this.callstats.sendDetectedAudioProblem(e);
456
-};
457
-
458 440
 /**
459 441
  * Adds to CallStats an application log.
460 442
  *

+ 0
- 8
service/statistics/Events.js Datei anzeigen

@@ -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…
Abbrechen
Speichern