Parcourir la source

few tweaks to fix some exceptions in edge

master
bbaldino il y a 7 ans
Parent
révision
f616b0b71b

+ 6
- 3
modules/UI/videolayout/VideoContainer.js Voir le fichier

626
         // the environment words the report. To reduce the risk of scaring a
626
         // the environment words the report. To reduce the risk of scaring a
627
         // developer, make sure that the rejection is handled. We cannot really
627
         // developer, make sure that the rejection is handled. We cannot really
628
         // do anything substantial about the rejection and, more importantly, we
628
         // do anything substantial about the rejection and, more importantly, we
629
-        // do not care.
630
-        this.$videoBackground[0].play()
631
-            .catch(reason => logger.error(reason));
629
+        // do not care. Some browsers (at this time, only Edge is known) don't
630
+        // return a promise from .play(), so check before trying to catch.
631
+        const res = this.$videoBackground[0].play();
632
+        if (typeof res !== 'undefined') {
633
+            res.catch(reason => logger.error(reason));
634
+        }
632
     }
635
     }
633
 }
636
 }

+ 8
- 0
react/features/connection-stats/components/ConnectionStatsTable.js Voir le fichier

476
  * @returns {string}
476
  * @returns {string}
477
  */
477
  */
478
 function getIP(value) {
478
 function getIP(value) {
479
+    if (!value) {
480
+        return '';
481
+    }
482
+
479
     return value.substring(0, value.lastIndexOf(':'));
483
     return value.substring(0, value.lastIndexOf(':'));
480
 }
484
 }
481
 
485
 
488
  * @returns {string}
492
  * @returns {string}
489
  */
493
  */
490
 function getPort(value) {
494
 function getPort(value) {
495
+    if (!value) {
496
+        return '';
497
+    }
498
+
491
     return value.substring(value.lastIndexOf(':') + 1, value.length);
499
     return value.substring(value.lastIndexOf(':') + 1, value.length);
492
 }
500
 }
493
 
501
 

Chargement…
Annuler
Enregistrer