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) {