Don't log error when WebRTC not supported

This function is *always* called when a MatrixClient is created, e.g. in
an appservice. If the environment does not support WebRTC, this is not
necessarily an error; it is expected in many situations.

Fix a small typo

Signed-off-by: Dexter Chua <dec41@srcf.net>
This commit is contained in:
Dexter Chua
2020-11-26 11:48:48 +08:00
parent 69f6bba964
commit bc46609caa
+1 -1
View File
@@ -1569,7 +1569,7 @@ export function setVideoInput(deviceId: string) { videoInput = deviceId; }
export function createNewMatrixCall(client: any, roomId: string, options?: CallOpts) {
// typeof prevents Node from erroring on an undefined reference
if (typeof(window) === 'undefined' || typeof(document) === 'undefined') {
logger.error("No window or document object: WebRTC is not supported in this environement");
logger.info("No window or document object: WebRTC is not supported in this environment");
return null;
}