mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 13:59:23 +00:00
Add support for call closed event
This commit is contained in:
parent
dbf30acd19
commit
cff2cdada2
@ -237,6 +237,10 @@ class UserWebSocket {
|
|||||||
SendEvent("callPeerReady", msg.data);
|
SendEvent("callPeerReady", msg.data);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "call_closed":
|
||||||
|
SendEvent("callClosed", msg.data);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
console.error("WS Unspported kind of message!", msg);
|
console.error("WS Unspported kind of message!", msg);
|
||||||
|
@ -111,6 +111,12 @@ document.addEventListener("callPeerReady", (e) => {
|
|||||||
OpenCalls.get(detail.callID).PeerReady(detail.peerID)
|
OpenCalls.get(detail.callID).PeerReady(detail.peerID)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
document.addEventListener("callClosed", e => {
|
||||||
|
const callID = e.detail;
|
||||||
|
|
||||||
|
if(OpenCalls.has(callID))
|
||||||
|
OpenCalls.get(callID).Close(false);
|
||||||
|
});
|
||||||
|
|
||||||
document.addEventListener("wsClosed", () => {
|
document.addEventListener("wsClosed", () => {
|
||||||
// Close all the current conversations
|
// Close all the current conversations
|
||||||
|
Loading…
Reference in New Issue
Block a user