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

Merge branch 'develop' into feed

This commit is contained in:
Šimon Brandner
2021-04-07 19:14:17 +02:00
2 changed files with 20 additions and 4 deletions

View File

@@ -367,7 +367,11 @@ export class MatrixCall extends EventEmitter {
this.checkForErrorListener();
try {
const screenshareConstraints = await getScreenshareContraints(selectDesktopCapturerSource);
if (!screenshareConstraints) return;
if (!screenshareConstraints) {
this.terminate(CallParty.Local, CallErrorCode.NoUserMedia, false);
return;
}
if (window.electron?.getDesktopCapturerSources) {
// We are using Electron
logger.debug("Getting screen stream using getUserMedia()...");
@@ -388,6 +392,7 @@ export class MatrixCall extends EventEmitter {
"Failed to get screen-sharing stream: ", err,
),
);
this.terminate(CallParty.Local, CallErrorCode.NoUserMedia, false);
}
this.type = CallType.Video;
}