mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
Handles remote peer streams interruption
This commit is contained in:
parent
04812e21bb
commit
b82cba518d
@ -237,6 +237,10 @@ class UserWebSocket {
|
|||||||
SendEvent("callPeerReady", msg.data);
|
SendEvent("callPeerReady", msg.data);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "call_peer_interrupted_streaming":
|
||||||
|
SendEvent("callPeerInterruptedStreaming", msg.data);
|
||||||
|
break;
|
||||||
|
|
||||||
case "call_closed":
|
case "call_closed":
|
||||||
SendEvent("callClosed", msg.data);
|
SendEvent("callClosed", msg.data);
|
||||||
break;
|
break;
|
||||||
|
@ -111,6 +111,13 @@ document.addEventListener("callPeerReady", (e) => {
|
|||||||
OpenCalls.get(detail.callID).PeerReady(detail.peerID)
|
OpenCalls.get(detail.callID).PeerReady(detail.peerID)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
document.addEventListener("callPeerInterruptedStreaming", (e) => {
|
||||||
|
const detail = e.detail
|
||||||
|
|
||||||
|
if(OpenCalls.has(detail.callID))
|
||||||
|
OpenCalls.get(detail.callID).RemoveMemberConnection(detail.peerID)
|
||||||
|
})
|
||||||
|
|
||||||
document.addEventListener("callClosed", e => {
|
document.addEventListener("callClosed", e => {
|
||||||
const callID = e.detail;
|
const callID = e.detail;
|
||||||
|
|
||||||
|
@ -850,9 +850,13 @@ class CallWindow extends CustomEvents {
|
|||||||
this.refreshButtonsState()
|
this.refreshButtonsState()
|
||||||
|
|
||||||
// Propagate information
|
// Propagate information
|
||||||
|
try {
|
||||||
await ws("calls/stop_streaming", {
|
await ws("calls/stop_streaming", {
|
||||||
callID: this.callID
|
callID: this.callID
|
||||||
})
|
})
|
||||||
|
} catch(e) {
|
||||||
|
console.log("Failed to notify of streaming stop", e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user