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

Cancel call if no source was selected

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner
2021-02-10 07:49:03 +01:00
parent 9f993f1f67
commit 1ecd7f274f

View File

@@ -377,6 +377,8 @@ export class MatrixCall extends EventEmitter {
logger.debug("Electron getDesktopCapturerSources() is available..."); logger.debug("Electron getDesktopCapturerSources() is available...");
try { try {
const selectedSource = await selectDesktopCapturerSource(); const selectedSource = await selectDesktopCapturerSource();
// If no source was selected cancel call
if (!selectedSource) return;
const getUserMediaOptions: MediaStreamConstraints | DesktopCapturerConstraints = { const getUserMediaOptions: MediaStreamConstraints | DesktopCapturerConstraints = {
audio: false, audio: false,
video: { video: {