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

Merge pull request #1601 from SimonBrandner/cancel-call-if-no-source

Cancel call if no source was selected
This commit is contained in:
J. Ryan Stinnett
2021-02-11 12:29:57 +00:00
committed by GitHub

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: {