I am trying to implement a call feature in my electron app with the help of sockets..as soon as one person calls the other person the person receiving the call gets a socket "start-call". I subscribe to all socket events and as soon as I receive this socket I open a modal which shows "incoming call" with both accept and decline button. what is happening is that suppose a browser window is opened on my app.. now when the person calls me I am getting that call modal on my browser window as well as the app-window too. I want that as soon as call gets accepted or declined the "incoming call" modal gets closed from all place.
this.socketSubscriber = this.socket.events.subscribe((res) => {
if(res?.event === 'call-start') {
this.dialog
.open(CallModalComponent, {
width: '300px',
disableClose: true,
})
})
that's how I am opening call modal as soon as "call-start" socket .. even after accepting or declining the call the "incoming-call" modal does not gets removed from other browser/app windows except the one from where i accepted or declined the call