Kaynağa Gözat

Remove isEdge checks

dev1
Jaya Allamsetty 6 yıl önce
ebeveyn
işleme
c8c9c43830

+ 0
- 5
JitsiConference.js Dosyayı Görüntüle

@@ -1931,11 +1931,6 @@ JitsiConference.prototype._setBridgeChannel = function(offerIq, pc) {
1931 1931
         break;
1932 1932
     }
1933 1933
 
1934
-    if (bridgeChannelType === 'datachannel'
1935
-        && !browser.supportsDataChannels()) {
1936
-        bridgeChannelType = 'websocket';
1937
-    }
1938
-
1939 1934
     if (bridgeChannelType === 'datachannel') {
1940 1935
         this.rtc.initializeBridgeChannel(pc, null);
1941 1936
     } else if (bridgeChannelType === 'websocket' && wsUrl) {

+ 1
- 3
modules/RTC/RTCUtils.js Dosyayı Görüntüle

@@ -179,7 +179,6 @@ function getConstraints(um, options = {}) {
179 179
     const isNewStyleConstraintsSupported
180 180
         = browser.isFirefox()
181 181
             || browser.isSafariWithVP8()
182
-            || browser.isEdge()
183 182
             || browser.isReactNative();
184 183
 
185 184
     if (um.indexOf('video') >= 0) {
@@ -1397,8 +1396,7 @@ class RTCUtils extends Listenable {
1397 1396
     isDeviceChangeAvailable(deviceType) {
1398 1397
         return deviceType === 'output' || deviceType === 'audiooutput'
1399 1398
             ? isAudioOutputDeviceChangeAvailable
1400
-            : browser.isChromiumBased()
1401
-                || browser.isFirefox() || browser.isEdge();
1399
+            : !browser.isSafariWithVP8();
1402 1400
     }
1403 1401
 
1404 1402
     /**

+ 0
- 2
modules/RTC/ScreenObtainer.js Dosyayı Görüntüle

@@ -142,8 +142,6 @@ const ScreenObtainer = {
142 142
 
143 143
             // Legacy Firefox
144 144
             return this.obtainScreenOnFirefox;
145
-        } else if (browser.isEdge() && browser.supportsGetDisplayMedia()) {
146
-            return this.obtainScreenFromGetDisplayMedia;
147 145
         }
148 146
 
149 147
         logger.log(

+ 1
- 1
modules/RTC/TraceablePeerConnection.js Dosyayı Görüntüle

@@ -614,7 +614,7 @@ TraceablePeerConnection.prototype._remoteStreamAdded = function(stream) {
614 614
     }
615 615
 
616 616
     // Bind 'addtrack'/'removetrack' event handlers
617
-    if (browser.isChromiumBased() || browser.isEdge()) {
617
+    if (browser.isChromiumBased()) {
618 618
         stream.onaddtrack = event => {
619 619
             this._remoteTrackAdded(stream, event.track);
620 620
         };

+ 5
- 44
modules/browser/BrowserCapabilities.js Dosyayı Görüntüle

@@ -30,12 +30,7 @@ export default class BrowserCapabilities extends BrowserDetection {
30 30
      * strategy or <tt>false</tt> otherwise.
31 31
      */
32 32
     doesVideoMuteByStreamRemove() {
33
-        return !(
34
-            this.isFirefox()
35
-            || this.isEdge()
36
-            || this.isReactNative()
37
-            || this.isSafariWithWebrtc()
38
-        );
33
+        return this.isChromiumBased();
39 34
     }
40 35
 
41 36
     /**
@@ -44,7 +39,7 @@ export default class BrowserCapabilities extends BrowserDetection {
44 39
      * otherwise.
45 40
      */
46 41
     supportsP2P() {
47
-        return !this.isEdge() && !this.isFirefox();
42
+        return !this.isFirefox();
48 43
     }
49 44
 
50 45
     /**
@@ -61,21 +56,11 @@ export default class BrowserCapabilities extends BrowserDetection {
61 56
      */
62 57
     isChromiumBased() {
63 58
         return this.isChrome()
64
-            || this.isChromiumBasedEdge()
65 59
             || this.isElectron()
66 60
             || this.isNWJS()
67 61
             || this.isOpera();
68 62
     }
69 63
 
70
-    /**
71
-     * Checks if the current browser is Edge that is Chromium based.
72
-     */
73
-    isChromiumBasedEdge() {
74
-        const REQUIRED_EDGE_VERSION = 72;
75
-
76
-        return this.isEdge() && this.isVersionGreaterThan(REQUIRED_EDGE_VERSION);
77
-    }
78
-
79 64
     /**
80 65
      * Checks if current browser is a Safari and a version of Safari that
81 66
      * supports native webrtc.
@@ -139,17 +124,7 @@ export default class BrowserCapabilities extends BrowserDetection {
139 124
     supportsBandwidthStatistics() {
140 125
         // FIXME bandwidth stats are currently not implemented for FF on our
141 126
         // side, but not sure if not possible ?
142
-        return !this.isFirefox() && !this.isEdge()
143
-            && !this.isSafariWithWebrtc();
144
-    }
145
-
146
-    /**
147
-     * Checks if the current browser supports WebRTC datachannels.
148
-     * @return {boolean}
149
-     */
150
-    supportsDataChannels() {
151
-        // NOTE: Edge does not yet implement DataChannel.
152
-        return !this.isEdge();
127
+        return !this.isFirefox() && !this.isSafariWithWebrtc();
153 128
     }
154 129
 
155 130
     /**
@@ -162,20 +137,6 @@ export default class BrowserCapabilities extends BrowserDetection {
162 137
             && typeof navigator.mediaDevices.addEventListener !== 'undefined';
163 138
     }
164 139
 
165
-    /**
166
-     * Checks if the current browser supports RTP statictics collecting.
167
-     * Required by {@link RTPStatsCollector}.
168
-     *
169
-     * @returns {boolean} true if they are supported, false otherwise.
170
-     */
171
-    supportsRtpStatistics() {
172
-        return this.isChromiumBased()
173
-            || this.isEdge()
174
-            || this.isFirefox()
175
-            || this.isReactNative()
176
-            || this.isSafariWithWebrtc();
177
-    }
178
-
179 140
     /**
180 141
      * Checks if the current browser supports RTT statistics for srflx local
181 142
      * candidates through the legacy getStats() API.
@@ -199,7 +160,7 @@ export default class BrowserCapabilities extends BrowserDetection {
199 160
         // (is reported as 1):
200 161
         // https://bugzilla.mozilla.org/show_bug.cgi?id=1241066
201 162
         // For Chrome and others we rely on 'googRtt'.
202
-        return !this.isFirefox() && !this.isEdge();
163
+        return !this.isFirefox();
203 164
     }
204 165
 
205 166
     /**
@@ -309,7 +270,7 @@ export default class BrowserCapabilities extends BrowserDetection {
309 270
      * @returns {boolean}
310 271
      */
311 272
     usesAdapter() {
312
-        return this.usesNewGumFlow() || this.isEdge();
273
+        return this.usesNewGumFlow();
313 274
     }
314 275
 
315 276
     /**

+ 33
- 88
modules/statistics/RTPStatsCollector.js Dosyayı Görüntüle

@@ -53,28 +53,6 @@ KEYS_BY_BROWSER_TYPE[browsers.CHROME] = {
53 53
     'port': 'port',
54 54
     'protocol': 'protocol'
55 55
 };
56
-KEYS_BY_BROWSER_TYPE[browsers.EDGE] = {
57
-    'sendBandwidth': 'googAvailableSendBandwidth',
58
-    'remoteAddress': 'remoteAddress',
59
-    'transportType': 'protocol',
60
-    'localAddress': 'localAddress',
61
-    'activeConnection': 'activeConnection',
62
-    'ssrc': 'ssrc',
63
-    'packetsReceived': 'packetsReceived',
64
-    'packetsSent': 'packetsSent',
65
-    'packetsLost': 'packetsLost',
66
-    'bytesReceived': 'bytesReceived',
67
-    'bytesSent': 'bytesSent',
68
-    'googFrameHeightReceived': 'frameHeight',
69
-    'googFrameWidthReceived': 'frameWidth',
70
-    'googFrameHeightSent': 'frameHeight',
71
-    'googFrameWidthSent': 'frameWidth',
72
-    'googFrameRateReceived': 'framesPerSecond',
73
-    'googFrameRateSent': 'framesPerSecond',
74
-    'audioInputLevel': 'audioLevel',
75
-    'audioOutputLevel': 'audioLevel',
76
-    'currentRoundTripTime': 'roundTripTime'
77
-};
78 56
 KEYS_BY_BROWSER_TYPE[browsers.OPERA]
79 57
     = KEYS_BY_BROWSER_TYPE[browsers.CHROME];
80 58
 KEYS_BY_BROWSER_TYPE[browsers.NWJS]
@@ -339,43 +317,41 @@ StatsCollector.prototype.start = function(startAudioLevelStats) {
339 317
         );
340 318
     }
341 319
 
342
-    if (browser.supportsRtpStatistics()) {
343
-        this.statsIntervalId = setInterval(
344
-            () => {
345
-                // Interval updates
346
-                self.peerconnection.getStats(
347
-                    report => {
348
-                        let results = null;
320
+    this.statsIntervalId = setInterval(
321
+        () => {
322
+            // Interval updates
323
+            self.peerconnection.getStats(
324
+                report => {
325
+                    let results = null;
326
+
327
+                    if (!report || !report.result
328
+                        || typeof report.result !== 'function') {
329
+                        // firefox
330
+                        results = report;
331
+                    } else {
332
+                        // chrome
333
+                        results = report.result();
334
+                    }
349 335
 
350
-                        if (!report || !report.result
351
-                            || typeof report.result !== 'function') {
352
-                            // firefox
353
-                            results = report;
336
+                    self.currentStatsReport = results;
337
+                    try {
338
+                        if (this._usesPromiseGetStats) {
339
+                            self.processNewStatsReport();
354 340
                         } else {
355
-                            // chrome
356
-                            results = report.result();
357
-                        }
358
-
359
-                        self.currentStatsReport = results;
360
-                        try {
361
-                            if (this._usesPromiseGetStats) {
362
-                                self.processNewStatsReport();
363
-                            } else {
364
-                                self.processStatsReport();
365
-                            }
366
-                        } catch (e) {
367
-                            GlobalOnErrorHandler.callErrorHandler(e);
368
-                            logger.error(`Unsupported key:${e}`, e);
341
+                            self.processStatsReport();
369 342
                         }
343
+                    } catch (e) {
344
+                        GlobalOnErrorHandler.callErrorHandler(e);
345
+                        logger.error(`Unsupported key:${e}`, e);
346
+                    }
370 347
 
371
-                        self.previousStatsReport = self.currentStatsReport;
372
-                    },
373
-                    error => self.errorCallback(error)
374
-                );
375
-            },
376
-            self.statsIntervalMilis
377
-        );
378
-    }
348
+                    self.previousStatsReport = self.currentStatsReport;
349
+                },
350
+                error => self.errorCallback(error)
351
+            );
352
+        },
353
+        self.statsIntervalMilis
354
+    );
379 355
 };
380 356
 
381 357
 /**
@@ -441,9 +417,6 @@ StatsCollector.prototype._defineGetStatValueMethod = function(keys) {
441 417
             return value;
442 418
         };
443 419
         break;
444
-    case browsers.EDGE:
445
-        itemStatByKey = (item, key) => item[key];
446
-        break;
447 420
     default:
448 421
         itemStatByKey = (item, key) => item[key];
449 422
     }
@@ -573,28 +546,11 @@ StatsCollector.prototype.processStatsReport = function() {
573 546
             });
574 547
         }
575 548
 
576
-        // NOTE: Edge's proprietary stats via RTCIceTransport.msGetStats().
577
-        if (now.msType === 'transportdiagnostics') {
578
-            this.conferenceStats.transport.push({
579
-                ip: now.remoteAddress,
580
-                type: now.protocol,
581
-                localip: now.localAddress,
582
-                p2p: this.peerconnection.isP2P
583
-            });
584
-        }
585
-
586 549
         if (now.type !== 'ssrc' && now.type !== 'outboundrtp'
587 550
             && now.type !== 'inboundrtp' && now.type !== 'track') {
588 551
             continue;
589 552
         }
590 553
 
591
-        // NOTE: In Edge, stats with type "inboundrtp" and "outboundrtp" are
592
-        // completely useless, so ignore them.
593
-        if (browser.isEdge()
594
-            && (now.type === 'inboundrtp' || now.type === 'outboundrtp')) {
595
-            continue;
596
-        }
597
-
598 554
         const before = this.previousStatsReport[idx];
599 555
         let ssrc = this.getNonNegativeStat(now, 'ssrc');
600 556
 
@@ -616,9 +572,7 @@ StatsCollector.prototype.processStatsReport = function() {
616 572
         // the sent bytes to the local download bitrate.
617 573
         // In new W3 stats spec, type="track" has a remoteSource boolean
618 574
         // property.
619
-        // Edge uses the new format, so skip this check.
620
-        if (!browser.isEdge()
621
-                && (now.isRemote === true || now.remoteSource === true)) {
575
+        if (now.isRemote === true || now.remoteSource === true) {
622 576
             continue;
623 577
         }
624 578
 
@@ -955,18 +909,9 @@ StatsCollector.prototype.processAudioLevelReport = function() {
955 909
             // According to the W3C WebRTC Stats spec, audioLevel should be in
956 910
             // 0..1 range (0 == silence). However browsers don't behave that
957 911
             // way so we must convert it to 0..1.
958
-            //
959
-            // In Edge the range is -100..0 (-100 == silence) measured in dB,
960
-            // so convert to linear. The levels are set to 0 for remote tracks,
961
-            // so don't convert those, since 0 means "the maximum" in Edge.
962
-            if (browser.isEdge()) {
963
-                audioLevel = audioLevel < 0 ? Math.pow(10, audioLevel / 20) : 0;
964
-
965 912
             // TODO: Can't find specs about what this value really is, but it
966 913
             // seems to vary between 0 and around 32k.
967
-            } else {
968
-                audioLevel = audioLevel / 32767;
969
-            }
914
+            audioLevel = audioLevel / 32767;
970 915
 
971 916
             if (!(ssrc in this.audioLevelReportHistory)) {
972 917
                 this.audioLevelReportHistory[ssrc] = {

+ 0
- 5
modules/xmpp/moderator.js Dosyayı Görüntüle

@@ -9,7 +9,6 @@ const AuthenticationEvents
9 9
     = require('../../service/authentication/AuthenticationEvents');
10 10
 const GlobalOnErrorHandler = require('../util/GlobalOnErrorHandler');
11 11
 
12
-import browser from '../browser';
13 12
 import Settings from '../settings/Settings';
14 13
 
15 14
 /**
@@ -262,10 +261,6 @@ Moderator.prototype.createConferenceIq = function() {
262 261
         break;
263 262
     }
264 263
 
265
-    if (openSctp && !browser.supportsDataChannels()) {
266
-        openSctp = false;
267
-    }
268
-
269 264
     elem.c(
270 265
         'property', {
271 266
             name: 'openSctp',

+ 2
- 2
package-lock.json Dosyayı Görüntüle

@@ -5497,8 +5497,8 @@
5497 5497
       "dev": true
5498 5498
     },
5499 5499
     "js-utils": {
5500
-      "version": "github:jitsi/js-utils#400ce825d3565019946ee75d86ed773c6f21e117",
5501
-      "from": "github:jitsi/js-utils#400ce825d3565019946ee75d86ed773c6f21e117",
5500
+      "version": "github:jitsi/js-utils#abc73a98a61124aa12c87c72dd0d86985a1a4d41",
5501
+      "from": "github:jitsi/js-utils#abc73a98a61124aa12c87c72dd0d86985a1a4d41",
5502 5502
       "requires": {
5503 5503
         "bowser": "2.7.0",
5504 5504
         "js-md5": "0.7.3",

+ 1
- 1
package.json Dosyayı Görüntüle

@@ -21,7 +21,7 @@
21 21
     "async": "0.9.0",
22 22
     "current-executing-script": "0.1.3",
23 23
     "jitsi-meet-logger": "github:jitsi/jitsi-meet-logger#5ec92357570dc8f0b7ffc1528820721c84c6af8b",
24
-    "js-utils": "github:jitsi/js-utils#400ce825d3565019946ee75d86ed773c6f21e117",
24
+    "js-utils": "github:jitsi/js-utils#abc73a98a61124aa12c87c72dd0d86985a1a4d41",
25 25
     "lodash.isequal": "4.5.0",
26 26
     "sdp-transform": "2.3.0",
27 27
     "strophe.js": "1.2.16",

Loading…
İptal
Kaydet