Browse Source

fix(JitsiLocalTrack): Disable no bytes sent error.

dev1
Hristo Terezov 5 years ago
parent
commit
40446bb948
2 changed files with 11 additions and 12 deletions
  1. 3
    12
      modules/RTC/JitsiLocalTrack.js
  2. 8
    0
      service/statistics/AnalyticsEvents.js

+ 3
- 12
modules/RTC/JitsiLocalTrack.js View File

@@ -19,6 +19,7 @@ import * as MediaType from '../../service/RTC/MediaType';
19 19
 import RTCEvents from '../../service/RTC/RTCEvents';
20 20
 import VideoType from '../../service/RTC/VideoType';
21 21
 import {
22
+    NO_BYTES_SENT,
22 23
     TRACK_UNMUTED,
23 24
     createNoDataFromSourceEvent
24 25
 } from '../../service/statistics/AnalyticsEvents';
@@ -140,15 +141,6 @@ export default class JitsiLocalTrack extends JitsiTrack {
140 141
         // correspond to the id of a matching device from the available device list.
141 142
         this._realDeviceId = this.deviceId === '' ? undefined : this.deviceId;
142 143
 
143
-        /**
144
-         * On mute event we are waiting for 3s to check if the stream is going
145
-         * to be still muted before firing the event for camera issue detected
146
-         * (NO_DATA_FROM_SOURCE).
147
-         */
148
-        this._noDataFromSourceTimeout = null;
149
-
150
-        this._onTrackMuted = this._onTrackMuted.bind(this);
151
-
152 144
         this._trackMutedTS = 0;
153 145
 
154 146
         this._onDeviceListWillChange = devices => {
@@ -633,10 +625,9 @@ export default class JitsiLocalTrack extends JitsiTrack {
633 625
             setTimeout(() => {
634 626
                 if (!this._hasSentData) {
635 627
                     logger.warn(`${this} 'bytes sent' <= 0: \
636
-                        ${this._bytesSent}`);
628
+                        ${bytesSent}`);
637 629
 
638
-                    // we are not receiving anything from the microphone
639
-                    this._fireNoDataFromSourceEvent();
630
+                    Statistics.analytics.sendEvent(NO_BYTES_SENT, { 'media_type': this.getType() });
640 631
                 }
641 632
             }, 3000);
642 633
             this._testDataSent = false;

+ 8
- 0
service/statistics/AnalyticsEvents.js View File

@@ -206,6 +206,14 @@ export const ICE_ESTABLISHMENT_DURATION_DIFF
206 206
  */
207 207
 export const ICE_STATE_CHANGED = 'ice.state.changed';
208 208
 
209
+/**
210
+ * Indicates that no bytes have been sent for the track.
211
+ *
212
+ * Properties:
213
+ *      mediaType: the media type of the local track ('audio' or 'video').
214
+ */
215
+export const NO_BYTES_SENT = 'track.no-bytes-sent';
216
+
209 217
 /**
210 218
  * Indicates that a track was unmuted (?).
211 219
  *

Loading…
Cancel
Save