1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Don't log if no WebRTC

as hopefully explained in comment
This commit is contained in:
David Baker
2021-01-12 17:58:35 +00:00
parent 0f90f055ba
commit b692cd109e

View File

@@ -1663,7 +1663,8 @@ 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.info("No window or document object: WebRTC is not supported in this environment");
// NB. We don't log here as apps try to create a call object as a test for
// whether calls are supported, so we shouldn't fill the logs up.
return null;
}