From a4f5228037bd4f452da5bb89bce4774a86cc47aa Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Mon, 13 Apr 2020 12:11:38 +0200 Subject: [PATCH] Improve support of audio-only calls --- assets/css/components/calls/window.css | 7 +++++++ assets/js/components/calls/window.js | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/assets/css/components/calls/window.css b/assets/css/components/calls/window.css index ad894b4d..1738395a 100644 --- a/assets/css/components/calls/window.css +++ b/assets/css/components/calls/window.css @@ -27,6 +27,10 @@ visibility: visible; } +.call-window.audio-only { + min-height: unset; +} + /* This could be moved to conversation page stylesheet also */ .call-window.embedded { position: unset; @@ -36,6 +40,9 @@ height: 150px; margin: 10px auto; } +.call-window.embedded.audio-only { + height: 90px; +} .call-window .head { color: white; diff --git a/assets/js/components/calls/window.js b/assets/js/components/calls/window.js index 8f709829..9725375f 100644 --- a/assets/js/components/calls/window.js +++ b/assets/js/components/calls/window.js @@ -48,6 +48,9 @@ class CallWindow extends CustomEvents { class: "call-window" }) + if(!this.conv.can_have_video_call) + this.rootEl.classList.add("audio-only") + // Construct head this.windowHead = createElem2({ @@ -475,7 +478,7 @@ class CallWindow extends CustomEvents { async toggleStream(isVideo) { if(isVideo && !this.conv.can_have_video_call) { - notify("Video calls can not be perfomed on this conversations!", "danger") + notify("Video calls can not be done on this conversations!", "danger") return; }