From: gparant Date: Thu, 14 May 2020 18:54:34 +0000 (+0200) Subject: Fix border view X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=182882fded3857c414e293aef36cde6e528fa333;p=libreadventure.git Fix border view --- 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"; } /**