Procházet zdrojové kódy

fix(JitsiLocalTrack): Disable no bytes sent error.

dev1
Hristo Terezov před 6 roky
rodič
revize
40446bb948
2 změnil soubory, kde provedl 11 přidání a 12 odebrání
  1. 3
    12
      modules/RTC/JitsiLocalTrack.js
  2. 8
    0
      service/statistics/AnalyticsEvents.js

+ 3
- 12
modules/RTC/JitsiLocalTrack.js Zobrazit soubor

19
 import RTCEvents from '../../service/RTC/RTCEvents';
19
 import RTCEvents from '../../service/RTC/RTCEvents';
20
 import VideoType from '../../service/RTC/VideoType';
20
 import VideoType from '../../service/RTC/VideoType';
21
 import {
21
 import {
22
+    NO_BYTES_SENT,
22
     TRACK_UNMUTED,
23
     TRACK_UNMUTED,
23
     createNoDataFromSourceEvent
24
     createNoDataFromSourceEvent
24
 } from '../../service/statistics/AnalyticsEvents';
25
 } from '../../service/statistics/AnalyticsEvents';
140
         // correspond to the id of a matching device from the available device list.
141
         // correspond to the id of a matching device from the available device list.
141
         this._realDeviceId = this.deviceId === '' ? undefined : this.deviceId;
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
         this._trackMutedTS = 0;
144
         this._trackMutedTS = 0;
153
 
145
 
154
         this._onDeviceListWillChange = devices => {
146
         this._onDeviceListWillChange = devices => {
633
             setTimeout(() => {
625
             setTimeout(() => {
634
                 if (!this._hasSentData) {
626
                 if (!this._hasSentData) {
635
                     logger.warn(`${this} 'bytes sent' <= 0: \
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
             }, 3000);
632
             }, 3000);
642
             this._testDataSent = false;
633
             this._testDataSent = false;

+ 8
- 0
service/statistics/AnalyticsEvents.js Zobrazit soubor

206
  */
206
  */
207
 export const ICE_STATE_CHANGED = 'ice.state.changed';
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
  * Indicates that a track was unmuted (?).
218
  * Indicates that a track was unmuted (?).
211
  *
219
  *

Načítá se…
Zrušit
Uložit