chat is working, ui updates
parent
f881a74057
commit
e29e92adb6
|
|
@ -13,6 +13,7 @@
|
||||||
<div class="label">Remote</div>
|
<div class="label">Remote</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-wrap">
|
<div class="btn-wrap">
|
||||||
|
<input type="button" id="dbg" onclick="showStatus(true)" value="DBG"></input>
|
||||||
<input type="button" id="start" onclick="start(true)" value="Connect"></input>
|
<input type="button" id="start" onclick="start(true)" value="Connect"></input>
|
||||||
</div>
|
</div>
|
||||||
<div id="chatWrap" class="chat-wrap" style="visibility:hidden">
|
<div id="chatWrap" class="chat-wrap" style="visibility:hidden">
|
||||||
|
|
@ -20,7 +21,7 @@
|
||||||
MESSAG AREA<br>
|
MESSAG AREA<br>
|
||||||
</div>
|
</div>
|
||||||
<div class="chat-input">
|
<div class="chat-input">
|
||||||
<input type="text" id="chatInput">
|
<input type="text" id="chatInput" placeholder="Write a message...">
|
||||||
<br><br>
|
<br><br>
|
||||||
<input type="button" id="send" onclick="sendMsg()" value="send"></input>
|
<input type="button" id="send" onclick="sendMsg()" value="send"></input>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -103,6 +104,8 @@
|
||||||
.msg-area{
|
.msg-area{
|
||||||
background: rgb(65,65,65);
|
background: rgb(65,65,65);
|
||||||
padding:1rem;
|
padding:1rem;
|
||||||
|
height: 360px;
|
||||||
|
overflow-y: scroll;
|
||||||
}
|
}
|
||||||
.chat-input{
|
.chat-input{
|
||||||
text-align:right;
|
text-align:right;
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,9 @@ function sendMsg(){
|
||||||
|
|
||||||
function writeMsg(msg){
|
function writeMsg(msg){
|
||||||
//alert(msg);
|
//alert(msg);
|
||||||
document.getElementById('msgArea').innerHTML += msg + '<br>';
|
const msgArea = document.getElementById('msgArea');
|
||||||
|
msgArea.innerHTML += msg + '<br>';
|
||||||
|
msgArea.scrollTop = msgArea.scrollHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getUserMediaSuccess(stream) {
|
function getUserMediaSuccess(stream) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue