From 7e6a8b477d434d4cb271f49d32261366df3967c0 Mon Sep 17 00:00:00 2001 From: "DESKTOP-FMM8UI0\\CLV" Date: Mon, 19 Apr 2021 15:16:56 +0200 Subject: [PATCH] Debug state of share Screen button --- front/src/WebRtc/MediaManager.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/front/src/WebRtc/MediaManager.ts b/front/src/WebRtc/MediaManager.ts index 9da4aa59..0c414a3f 100644 --- a/front/src/WebRtc/MediaManager.ts +++ b/front/src/WebRtc/MediaManager.ts @@ -309,12 +309,17 @@ export class MediaManager { } private enableScreenSharing() { - this.monitorClose.style.display = "none"; - this.monitor.style.display = "block"; - this.monitorBtn.classList.add("enabled"); this.getScreenMedia().then((stream) => { this.triggerStartedScreenSharingCallbacks(stream); + this.monitorClose.style.display = "none"; + this.monitor.style.display = "block"; + this.monitorBtn.classList.add("enabled"); + }, () => { + this.monitorClose.style.display = "block"; + this.monitor.style.display = "none"; + this.monitorBtn.classList.remove("enabled"); }); + } private disableScreenSharing() {