[mirotalk] - add reply on new msg

This commit is contained in:
Miroslav Pejic
2021-01-14 22:10:40 +01:00
parent adc8d4faba
commit 972b881567
+21 -10
View File
@@ -556,13 +556,7 @@ function sendMessage() {
}).then((result) => {
if (result.isConfirmed) {
let msg = result.value;
if (msg) {
// Send message over signaling server
signalingSocket.emit("msg", {
peers: peers,
msg: msg,
});
}
emitMsg(msg);
}
});
}
@@ -580,18 +574,35 @@ function showMessage(msg) {
input: "textarea",
inputLabel: "New Message",
inputValue: msg,
inputAttributes: {
"aria-label": "Type your message here",
},
showDenyButton: true,
confirmButtonText: `Reply`,
denyButtonText: `Cancel`,
showClass: {
popup: "animate__animated animate__fadeInDown",
},
hideClass: {
popup: "animate__animated animate__fadeOutUp",
},
}).then((result) => {
if (result.isConfirmed) {
let msg = result.value;
emitMsg(msg);
}
});
}
// =====================================================
// Send message over signaling server
// =====================================================
function emitMsg(msg) {
if (msg) {
signalingSocket.emit("msg", {
peers: peers,
msg: msg,
});
}
}
// =====================================================
// active - disactive screen sharing
// =====================================================