Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

129
Vistas
multiple times a modal getting opened in electrons browser windows

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

7 months ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos