videomail-client 6.0.2 → 6.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/js/util/browser.js
CHANGED
|
@@ -23,6 +23,7 @@ const Browser = function (options) {
|
|
|
23
23
|
const isIOS = uaParser.os.name === 'iOS'
|
|
24
24
|
const browserVersion = parseFloat(uaParser.browser.version)
|
|
25
25
|
const isChrome = uaParser.browser.name === 'Chrome'
|
|
26
|
+
const isBrave = uaParser.browser.name === 'Brave'
|
|
26
27
|
const isChromium = uaParser.browser.name === 'Chromium'
|
|
27
28
|
const firefox = uaParser.browser.name === 'Firefox'
|
|
28
29
|
const osVersion = parseFloat(uaParser.os.version)
|
|
@@ -43,7 +44,14 @@ const Browser = function (options) {
|
|
|
43
44
|
const isHTTPS = options.fakeHttps || window.location.protocol === 'https:'
|
|
44
45
|
|
|
45
46
|
const okBrowser =
|
|
46
|
-
chromeBased ||
|
|
47
|
+
chromeBased ||
|
|
48
|
+
firefox ||
|
|
49
|
+
isAndroid ||
|
|
50
|
+
isOpera ||
|
|
51
|
+
isEdge ||
|
|
52
|
+
isOkSafari ||
|
|
53
|
+
isOkIOS ||
|
|
54
|
+
isBrave
|
|
47
55
|
|
|
48
56
|
const self = this
|
|
49
57
|
|
|
@@ -401,31 +401,31 @@ const Recorder = function (visuals, replay, defaultOptions = {}) {
|
|
|
401
401
|
})
|
|
402
402
|
|
|
403
403
|
stream.on('error', function (err) {
|
|
404
|
-
debug(PIPE_SYMBOL + 'Stream *error* event emitted'
|
|
405
|
-
|
|
406
|
-
connecting = connected = false
|
|
407
|
-
|
|
408
|
-
let videomailError
|
|
409
|
-
|
|
410
|
-
if (browser.isIOS()) {
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
} else {
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
self.emit(Events.ERROR, videomailError)
|
|
404
|
+
debug(PIPE_SYMBOL + 'Stream *error* event emitted: ' + pretty(err))
|
|
405
|
+
|
|
406
|
+
// connecting = connected = false
|
|
407
|
+
|
|
408
|
+
// let videomailError
|
|
409
|
+
|
|
410
|
+
// if (browser.isIOS()) {
|
|
411
|
+
// // setting custom text since that err object isn't really an error
|
|
412
|
+
// // on iphones when locked, and unlocked, this err is actually
|
|
413
|
+
// // an event object with stuff we can't use at all (an external bug)
|
|
414
|
+
// videomailError = VideomailError.create(
|
|
415
|
+
// 'Sorry, connection has timed out',
|
|
416
|
+
// 'iPhones cannot maintain a live connection for too long.',
|
|
417
|
+
// options
|
|
418
|
+
// )
|
|
419
|
+
// } else {
|
|
420
|
+
// // or else it could be a poor wifi connection...
|
|
421
|
+
// videomailError = VideomailError.create(
|
|
422
|
+
// 'Data exchange interrupted',
|
|
423
|
+
// 'Please check your network connection and reload.',
|
|
424
|
+
// options
|
|
425
|
+
// )
|
|
426
|
+
// }
|
|
427
|
+
|
|
428
|
+
// self.emit(Events.ERROR, videomailError)
|
|
429
429
|
})
|
|
430
430
|
|
|
431
431
|
// just experimental
|