Call ended event added

This commit is contained in:
Sourya Banerjee 2024-10-18 12:48:51 +05:30
parent decd45827d
commit 1fab0febd4

View File

@ -84,6 +84,11 @@ io.on("connection", (socket: Socket) => {
socket.on("webrtc-ice-candidate", (data: { to: string; candidate: any }) => {
socket.to(data.to).emit("webrtc-ice-candidate", data);
});
// Handle call-ended event
socket.on("call-ended", (data: { to: string }) => {
socket.to(data.to).emit("call-ended");
});
});
// Define a basic route