From e29e92adb610601baad698ccc5e81c5a66cbe0d2 Mon Sep 17 00:00:00 2001 From: Mathieu Dombrock Date: Sun, 26 Feb 2023 17:51:43 -0800 Subject: [PATCH] chat is working, ui updates --- client/index.html | 5 ++++- client/webrtc.js | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/client/index.html b/client/index.html index 0b8f664..9340202 100755 --- a/client/index.html +++ b/client/index.html @@ -13,6 +13,7 @@
Remote
+
- +

@@ -103,6 +104,8 @@ .msg-area{ background: rgb(65,65,65); padding:1rem; + height: 360px; + overflow-y: scroll; } .chat-input{ text-align:right; diff --git a/client/webrtc.js b/client/webrtc.js index 4d9a218..d272ede 100755 --- a/client/webrtc.js +++ b/client/webrtc.js @@ -71,7 +71,9 @@ function sendMsg(){ function writeMsg(msg){ //alert(msg); - document.getElementById('msgArea').innerHTML += msg + '
'; + const msgArea = document.getElementById('msgArea'); + msgArea.innerHTML += msg + '
'; + msgArea.scrollTop = msgArea.scrollHeight; } function getUserMediaSuccess(stream) {