Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't log error when environment does not support WebRTC #1547

Merged
merged 1 commit into from
Nov 26, 2020

Conversation

dalcde
Copy link
Contributor

@dalcde dalcde commented Nov 26, 2020

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.

@@ -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 environement");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while we're here:

Suggested change
logger.info("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");

@turt2live turt2live requested a review from a team November 26, 2020 04:08
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 <[email protected]>
@dalcde
Copy link
Contributor Author

dalcde commented Nov 26, 2020 via email

Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, seems reasonable to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants