|
@@ -47,6 +47,25 @@ export default class BrowserCapabilities extends BrowserDetection {
|
47
|
47
|
return !this.isEdge() && !this.isFirefox();
|
48
|
48
|
}
|
49
|
49
|
|
|
50
|
+ /**
|
|
51
|
+ * Checks if the current browser is Chromium based, that is, it's either
|
|
52
|
+ * Chrome / Chromium or uses it as its engine, but doesn't identify as
|
|
53
|
+ * Chrome.
|
|
54
|
+ *
|
|
55
|
+ * This includes the following browsers:
|
|
56
|
+ * - Chrome and Chromium
|
|
57
|
+ * - Other browsers which use the Chrome engine, but are detected as Chrome,
|
|
58
|
+ * such as Brave and Vivaldi
|
|
59
|
+ * - Browsers which are NOT Chrome but use it as their engine, and have
|
|
60
|
+ * custom detection code: Opera, Electron and NW.JS
|
|
61
|
+ */
|
|
62
|
+ isChromiumBased() {
|
|
63
|
+ return this.isChrome()
|
|
64
|
+ || this.isElectron()
|
|
65
|
+ || this.isNWJS()
|
|
66
|
+ || this.isOpera();
|
|
67
|
+ }
|
|
68
|
+
|
50
|
69
|
/**
|
51
|
70
|
* Checks if current browser is a Safari and a version of Safari that
|
52
|
71
|
* supports native webrtc.
|
|
@@ -64,12 +83,9 @@ export default class BrowserCapabilities extends BrowserDetection {
|
64
|
83
|
* @returns {boolean} true if the browser is supported, false otherwise.
|
65
|
84
|
*/
|
66
|
85
|
isSupported() {
|
67
|
|
- return this.isChrome()
|
|
86
|
+ return this.isChromiumBased()
|
68
|
87
|
|| this.isEdge()
|
69
|
|
- || this.isElectron()
|
70
|
88
|
|| this.isFirefox()
|
71
|
|
- || this.isNWJS()
|
72
|
|
- || this.isOpera()
|
73
|
89
|
|| this.isReactNative()
|
74
|
90
|
|| this.isSafariWithWebrtc();
|
75
|
91
|
}
|
|
@@ -81,7 +97,7 @@ export default class BrowserCapabilities extends BrowserDetection {
|
81
|
97
|
* otherwise.
|
82
|
98
|
*/
|
83
|
99
|
supportsVideoMuteOnConnInterrupted() {
|
84
|
|
- return this.isChrome() || this.isElectron() || this.isReactNative();
|
|
100
|
+ return this.isChromiumBased() || this.isReactNative();
|
85
|
101
|
}
|
86
|
102
|
|
87
|
103
|
/**
|
|
@@ -132,12 +148,9 @@ export default class BrowserCapabilities extends BrowserDetection {
|
132
|
148
|
* @returns {boolean} true if they are supported, false otherwise.
|
133
|
149
|
*/
|
134
|
150
|
supportsRtpStatistics() {
|
135
|
|
- return this.isChrome()
|
|
151
|
+ return this.isChromiumBased()
|
136
|
152
|
|| this.isEdge()
|
137
|
|
- || this.isElectron()
|
138
|
153
|
|| this.isFirefox()
|
139
|
|
- || this.isNWJS()
|
140
|
|
- || this.isOpera()
|
141
|
154
|
|| this.isReactNative()
|
142
|
155
|
|| this.isSafariWithWebrtc();
|
143
|
156
|
}
|
|
@@ -147,9 +160,7 @@ export default class BrowserCapabilities extends BrowserDetection {
|
147
|
160
|
* candidates through the legacy getStats() API.
|
148
|
161
|
*/
|
149
|
162
|
supportsLocalCandidateRttStatistics() {
|
150
|
|
- return this.isChrome()
|
151
|
|
- || this.isElectron()
|
152
|
|
- || this.isReactNative();
|
|
163
|
+ return this.isChromiumBased() || this.isReactNative();
|
153
|
164
|
}
|
154
|
165
|
|
155
|
166
|
/**
|
|
@@ -192,11 +203,8 @@ export default class BrowserCapabilities extends BrowserDetection {
|
192
|
203
|
* @returns {boolean}
|
193
|
204
|
*/
|
194
|
205
|
supportsSimulcast() {
|
195
|
|
- return this.isChrome()
|
196
|
|
- || this.isFirefox()
|
197
|
|
- || this.isElectron()
|
198
|
|
- || this.isNWJS()
|
199
|
|
- || this.isReactNative();
|
|
206
|
+ return this.isChromiumBased()
|
|
207
|
+ || this.isFirefox() || this.isReactNative();
|
200
|
208
|
}
|
201
|
209
|
|
202
|
210
|
/**
|