xiongzhu 2 лет назад
Родитель
Сommit
28fbf96a43
1 измененных файлов с 7 добавлено и 2 удалено
  1. 7 2
      lib/parsec.js

+ 7 - 2
lib/parsec.js

@@ -838,7 +838,8 @@ Parsec.prototype.clientNewAttempt = function (a) {
             d =
                 /Chrome/.test(navigator.userAgent) &&
                 /Google Inc/.test(navigator.vendor);
-            if (!d) return (b.status = Status.PARSEC_WRN_BROWSER), l.return(null);
+            if (!d)
+                return (b.status = Status.PARSEC_WRN_BROWSER), l.return(null);
             if (b.status != Status.PARSEC_NOT_RUNNING) return l.return(null);
             b.status = Status.PARSEC_CONNECTING;
             R = {};
@@ -937,7 +938,11 @@ Parsec.prototype.clientNewAttempt = function (a) {
                     timestamp: 1e3 * performance.now(),
                     duration: 0,
                 });
-                b.i.decode(c);
+                try {
+                    b.i.decode(c);
+                } catch (e) {
+                    console.trace(e);
+                }
             });
             V(b.b, "audio", 2, null, function (c) {
                 "configured" != b.g.state &&