few tweaks to fix some exceptions in edge
This commit is contained in:
parent
70422f4a47
commit
f616b0b71b
|
@ -626,8 +626,11 @@ export class VideoContainer extends LargeContainer {
|
||||||
// the environment words the report. To reduce the risk of scaring a
|
// the environment words the report. To reduce the risk of scaring a
|
||||||
// developer, make sure that the rejection is handled. We cannot really
|
// developer, make sure that the rejection is handled. We cannot really
|
||||||
// do anything substantial about the rejection and, more importantly, we
|
// do anything substantial about the rejection and, more importantly, we
|
||||||
// do not care.
|
// do not care. Some browsers (at this time, only Edge is known) don't
|
||||||
this.$videoBackground[0].play()
|
// return a promise from .play(), so check before trying to catch.
|
||||||
.catch(reason => logger.error(reason));
|
const res = this.$videoBackground[0].play();
|
||||||
|
if (typeof res !== 'undefined') {
|
||||||
|
res.catch(reason => logger.error(reason));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -476,6 +476,10 @@ class ConnectionStatsTable extends Component {
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
function getIP(value) {
|
function getIP(value) {
|
||||||
|
if (!value) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
return value.substring(0, value.lastIndexOf(':'));
|
return value.substring(0, value.lastIndexOf(':'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -488,6 +492,10 @@ function getIP(value) {
|
||||||
* @returns {string}
|
* @returns {string}
|
||||||
*/
|
*/
|
||||||
function getPort(value) {
|
function getPort(value) {
|
||||||
|
if (!value) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
return value.substring(value.lastIndexOf(':') + 1, value.length);
|
return value.substring(value.lastIndexOf(':') + 1, value.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue