From 182882fded3857c414e293aef36cde6e528fa333 Mon Sep 17 00:00:00 2001 From: gparant Date: Thu, 14 May 2020 20:54:34 +0200 Subject: [PATCH] Fix border view --- front/src/WebRtc/MediaManager.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/front/src/WebRtc/MediaManager.ts b/front/src/WebRtc/MediaManager.ts index 3bfc287..1e18355 100644 --- a/front/src/WebRtc/MediaManager.ts +++ b/front/src/WebRtc/MediaManager.ts @@ -180,12 +180,16 @@ export class MediaManager { * * @param userId */ - disabledVideoByUserId(userId: string){ + disabledVideoByUserId(userId: string) { let element = document.getElementById(`${userId}`); - if(!element){ + if (element) { + element.style.opacity = "0"; + } + element = document.getElementById(`div-${userId}`); + if (!element) { return; } - element.style.opacity = "0"; + element.style.borderStyle = "solid"; } /** @@ -194,10 +198,14 @@ export class MediaManager { */ enabledVideoByUserId(userId: string){ let element = document.getElementById(`${userId}`); + if(element){ + element.style.opacity = "1"; + } + element = document.getElementById(`div-${userId}`); if(!element){ return; } - element.style.opacity = "1"; + element.style.borderStyle = "none"; } /** -- 2.25.1